Hacker News new | past | comments | ask | show | jobs | submit login

But where do you stop?

Some languages may have boolean types, where others evaluate non-boolean types as true/false. So do you say "if myflag" or "if myflag=true" to make sure it's valid?

And some languages don't have short circuit operators, which I find annoying, but have learned to work around. Should I then write C or whatever that way, when I do have short circuit and/or?




I try to be reasonable. There is probably no hard rule (a lot of people seem to want that) but you have to see where things are causing problems and then addressing them.


> But where do you stop?

The moment you catch yourself adding parentheses to other people's code to be able to understand it, and then having to "git checkout --patch" to flip it back the way it was.


If (myFlag===true) ...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: