3 ms·
As of right now the results are as follows: - CamelCase 52.34% (4,493 votes) - underscores 47.66% (4,092 votes) Which kind of says it all. Use whatever s
by untog 12y ago
As of right now the results are as follows:
- CamelCase 52.34% (4,493 votes)
- underscores 47.66% (4,092 votes)
Which kind of says it all. Use whatever style you want, stop worrying so much about what other people are doing. Variable names a far more important than the formatting you use with them.
- nkozyra 12y agoI think "use whatever style you want" is a fair ethos for personal projects but the truth is it never works for teams. If organizations allowed that you'd have no conventions and codebases would be a mess for all involved. Years ago I moved from_underscores toCamelCase but I'm not vehemently passionate about it and there are plenty of cases where I need to go back to match_conventions.
- untog 12y agoWell, sure, when part of a team, make a decision and go with it. But most of the time these debates on HN just disappear down a hole of people arguing past each other and caring far too much about something that doesn't matter.
- lmm 12y ago> I think "use whatever style you want" is a fair ethos for personal projects but the truth is it never works for teams. Citation needed; my experience is just the opposite (it works much better than trying to specify some kind of organization-wide standard).
- kbenson 12y agoInterestingly, the end of article poll has very different results, - CamelCase 43.84% (1,117 votes) - underscores 56.16% (1,431 votes) The beginning poll still is still within half a percent of your numbers as of now. Apparently, people who prefer underscores are more likely to follow through. ;)
- lutusp 12y ago> Apparently, people who prefer underscores are more likely to follow through. Or perhaps they're predisposed to underscore their arguments. :)
- wvenable 12y agoI said CamelCase but depending the code base I'll use underscores. It almost has no affect on my brain anymore; I can read both easily. I like using CamelCase for most things because it gives the option of also using underscores on top of that. For example, for database and table names, I'll use CamelCase for names but underscores for primitive namespacing.