4 ms·
Agreed > if item not in collection reads quite nicely. I don't see what the problem is there? Anyway, I don't think his one gripe with this is enough reason t
by LouisSayers 11y ago
Agreed
> if item not in collection
reads quite nicely. I don't see what the problem is there? Anyway, I don't think his one gripe with this is enough reason to throw the rest of his argument out.
- freditup 11y agoI actually find that the use of "!" over "not" improves readability. English words tend to all blend together and take more time to parse, whereas a nice "!" token is easy to recognize at a glance. That being said, "not" is of course more understandable for somebody who has no idea about the language; however, asking a programmer to learn a single symbol for "not" is not too much to ask :)
- wohlben 11y agodepends how much attention you're paying at the moment. its easier to miss a ! than a 'not' at a quick glance
- singularity2001 11y agogood point! all syntax highlighters should color negations in neon red
- theodorton 11y agounless item in collection Obviously is the best choice
- pmontra 11y agoYes, and it's the idiomatic Ruby one.
- LouisSayers 11y agoTouché ;)
- deleted 11y ago[deleted]