logoalt Hacker News

zdragnar10/01/20242 repliesview on HN

Maybe I'm in a minority, but I genuinely dislike conditions placed afterwards.

They feel great to type out when you're in the flow, but coming back and reading them grates on my nerves. Seeing the condition first means I load a logical branch into my mental context. Seeing the condition after means I have to rewrite the context of what I just read to become part of a logical branch, and now the flow of reading is broken.


Replies

User2310/02/2024

Try thinking of it as prefix if and infix if?

And in any event it’s a very natural language pattern if you know what I mean.

show 1 reply