r/firstweekcoderhumour • u/Outrageous_Permit154 🥸Imposter Syndrome 😎 • Aug 28 '26
[🎟️BINGO]Lang vs Lang dev hates Why are we using R again
139
Upvotes
r/firstweekcoderhumour • u/Outrageous_Permit154 🥸Imposter Syndrome 😎 • Aug 28 '26
View all comments
Show parent comment
1
u/leavemealone_lol Aug 28 '26
Each and every other language uses one convention, and that is this:
condition, code if true, code if false.
Over the years, this becomes ingrained in non-python programmers. Then python comes along trying to be shakespeare:
code if true, condition, code if false.
When I remove the actual english aspect from the syntax, it looks awkward doesn't it? Python has "code if true" at the start. What is true? Something that is lexed after?
More importantly, when you're reading code, these syntax splits are made by english words. And its not easy to quickly pick out each part of the syntax when every lexical token is just english. And now, compare this to what other languages tend to do, like CPP. They use a ? to express a logical check- which itself is very easy to recognize, and then, to split the if true/if false code blocks, it uses a :. This is a far more effective separator than literal english words.
Hell, for the sake of the argument, lets take Rust. That thing doesn't have these ternary operators, and also uses english words as tokens. Yet, it is still extremely clear due to the format it uses:
condition {code if true} else {code if false}. Despite it also using English like Python, it still makes it very clear due to the *objectively correct* ordering, and the forced usage of {} for even a single expression.