|
|
|
|
|
by danso
4852 days ago
|
|
> When I first started learning Ruby, I was excited to discover that Ruby has the keywords and and or as boolean operators. I quickly got into the habit of writing all of my boolean statements with these, instead of the more conventional && and ||, because my code became so much readable pry(main)> a = true && false
pry(main)> a = true and false
Hmm...I dunno, I don't think the latter is necessarily easier to read than the former. The use of the symbols helps, for me at least, to delineate between value/variables and operators. Those symbols aren't pretty but their ugliness can serve a purpose.I don't mind using them in SQL, but only because SQL is case-insensitive and I can stick to the style of making all syntax uppercase. |
|