by rangerelf · 2y ago · 0 comments
It's a question of ergonomics, just like my favorite chair is not going to be your favorite chair for whatever reason, programming language constructs that bug you doesn't mean it'll bug anyone else.
Your foreach() example bugs the hell out of me, for example. But I'm not campaigning to have it erased from existence, I just don't use languages that model their syntax like that.
foo = 1 if true else 0
I think this was designed because most of the time foo should equal 1, and they want the code to highlight the default.
I don't like it because reading left to right it takes a few characters to realize it is a branching statement.