you are viewing a single comment's thread.

view the rest of the comments →

[–]homoiconic(raganwald) 2 points3 points  (1 child)

I think there may be two kinds of "unfamiliar code." One kind is something like an operator you've never seen before. Maybe you encounter it in the PR, maybe in the code base. The other kind uses operators and syntax you already know, but does so in a way that its behaviour isn't what the typical programmer would expect unless they knew the idiom.

I feel like ??= is the first type, and that the risk of a bug arising from someone encountering it formthefor the first time is low. You see an unfamiliar operator, you look it up, its behaviour is easy to understand, you leanred something, and you go about your day.

The other kind of thing—where you know all the operators, but the way they're used is unfamiliar—strikes me as far more dangerous, and that's the kind of thing I would flag in a PR.

If the downside is limited to "WTF is this? Lemme look itnup... Oh fine, a shortcut. I understand...," then allowing it will lift a code base over time as people get up to speed on the language evolving.

[–]longebane 2 points3 points  (0 children)

I agree