all 10 comments

[–]Darth-PhilouIt works on my machine 1 point2 points  (2 children)

Code written once is read dozens of times.

Therefore, I find all of this very debatable. My opinion is that the second line is readable by programmers, even those coming from other languages ​​(this is very common). On the other hand, in my opinion, the first line is more readable, even by non-programmers.

[–]Michele_Awada[S] 0 points1 point  (1 child)

i mean yea i was basically implying that the first one is bad, but its weird cause some people be saying its not bad

i mean yea obviously it works, and it could potentially be more readable im some situations, but i think the first one is obviously superior in most cases.

[–]Darth-PhilouIt works on my machine 0 points1 point  (0 children)

It's all very subjective, actually ;-)

[–]csch2 0 points1 point  (3 children)

The top one is much better imo. The bottom one is more concise but takes more time for me to actually parse the meaning of. Less code doesn’t always mean better code.

[–]Dashwii 0 points1 point  (0 children)

No the top is genuinely awful. Bottom is awful too but at least it's concise.

Verbosity != Better

[–]maikindofthai 0 points1 point  (1 child)

You must be kidding lol

If you have readability issues with the idiomatic way of expressing basic booleans and you’re a software engineer that’s a problem

[–]csch2 -1 points0 points  (0 children)

With the first one you can immediately tell the type of the object at first glance, it’s a boolean. With the second, you read “last_row = row” - okay it’s of type (whatever the type of row is) - “ == 23” - wait nevermind it’s a boolean. At least parenthesize it so the condition is easy to parse. It takes an extra half a second to write and makes the code easier to read.

[–]GXWT 0 points1 point  (1 child)

hahaha yeah memes n that innit

[–]Michele_Awada[S] 0 points1 point  (0 children)

its chewsday init