Nick Sabalausky wrote:
I find:

   case a == 0 && b !is null && c == "Bar" { ... }

much easier to read than:

   case a == 0 and b !is null and c == "Bar" { ... }

Since the former uses a totally different character set for the operators, my eyes can parse it at a glance. With the latter, I have to actually go through and read it. The "and" and "or" just visually blend together with all the other words and variables.

I've set up some custom keywords in Notepad++ which I use to test this stuff out. 'null' and 'is' are separate colors from case/and/or so it's easier to parse-at-a-glance since &&/|| are colored the same as operators and conflict with the '=='/'!is'. But I guess this is largely syntax-highlighting issue. Still, I find 'and'/'or' quicker to type, but I'm not strongly against using either one or both for that matter.


Reply via email to