3 ms·
Underscores win. Having said that; if your standard lib chose camels, that's probably what you should be choosing too. Consistency is the most important criteri
by teamhappy 12y ago
Underscores win. Having said that; if your standard lib chose camels, that's probably what you should be choosing too. Consistency is the most important criteria.
I personally favour the C-style fuck-it-all naming scheme:
else if (like) {
likelowbar = true;
vote(lowbarfmt);
}
The narrower the columns, the easier it is for me to comprehend the algorithm. It also makes for great method names. Say "isatty" three times; it's fun, isn't it?
// BTW: I don't believe anyone telling me they can read camels more efficiently. Underscores add contrast, which aids your vision quite a bit.
- louthy 12y ago> // BTW: I don't believe anyone telling me they can read camels more efficiently. Maybe it's time to accept that other people have different opinions to you, and maybe, just maybe have a preference for camel-casing.
- teamhappy 12y agoThere is an objective, scientific truth to which one is easier to read. It_might_be_this_one, or ItMightBeThatOne. I don't know which one it is, but I do know that facts don't require opinion. I'm glad you used the word "preference." I wish people wouldn't feel the need to justify arbitrary choices they make in life. It's your code and I will honour the choices you made if I ever end up working on it. You can't expect me to drink the Kool-Aid though.
- louthy 12y ago> ItMightBeThatOne Are we discussing Pascal casing now? ;) > There is an objective, scientific truth to which one is easier to read I seriously doubt that. I would have thought that training over many years creates a bias one way or the other. I find It_might_be_this_one much harder to read than itMightBeThatOne. I much prefer kebab-casing-over-underscores also. Perhaps there's a definitive answer for new programmers who have never seen either casing style? But for you to claim that those who disagree with you are drinking Kool-Aid is disingenuous.
- teamhappy 12y agoIt is training over many years. The text you read most of the time isn't code though, which is exactly why I suspect the underscores to be more intuitive for your eyes. Please don't misunderstand the Kool-Aid part. I prefer "thisone" over all the others. It's probably the worst choice, but it works for me. I don't expect you to drink my Kool-Aid.