etherial: St. Basil's Cathedral, Moscow (St. Basil's)
etherial ([personal profile] etherial) wrote2008-01-29 12:24 pm

Underscores may be easier to read, but...

[identity profile] anitra.livejournal.com 2008-01-29 02:35 pm (UTC)(link)
I still use CamelCase. It's easier to type than using lots of underscores.

Re: Underscores may be easier to read, but...

[identity profile] etherial.livejournal.com 2008-01-29 02:42 pm (UTC)(link)
See, I find underscores painful to look at.

Re: Underscores may be easier to read, but...

[identity profile] rosinavs.livejournal.com 2008-01-29 03:02 pm (UTC)(link)
They are annoying to type, but they are easier to read than the others. I can still read the others just fine, though.

[identity profile] nyren.livejournal.com 2008-01-29 03:02 pm (UTC)(link)
MY.WORKPLACE.USES.dots.and.capitalization

[identity profile] aleksandyr.livejournal.com 2008-01-29 03:03 pm (UTC)(link)
thisIsCamelCase, ThisIsPascalCase. :)

I alternate between them: in most languages, I use PascalCase to handle classes/methods and then camelCase for parameters/variables.

Underscores and CAPITAL_LETTERS are what I use for constants.

[identity profile] nerdx111.livejournal.com 2008-01-29 06:45 pm (UTC)(link)
On the contrary, if you read past the introduction of that page, the first paragraph states that the variants are called UpperCamelCase and lowerCamelCase and that some groups map the name camel case only to lowerCamelCase and refer to UpperCamelCase as PascalCase.

That said, I call them Upper and lower CamelCase. Also, the teams I am on at BBN practice
UpperCamelCase for classes
lowerCamelCase for methods/instance variables
CAPS_AND_UNDERSCORES for enumerations and constants.
oh, and lowercase.with.dots for package names.

(Anonymous) 2008-01-29 03:41 pm (UTC)(link)
I prefer underscores_all_lowercase, although I do use BumpyCase for the names of classes.

[identity profile] agthorr.livejournal.com 2008-01-29 03:42 pm (UTC)(link)
That was me. Why can't LJ keep me logged in?

[identity profile] stillking.livejournal.com 2008-01-29 04:12 pm (UTC)(link)

this is pretty much generational -- the old C programmers like lower_case_syntax, whereas newer C++/Java/Hungarian folks preferItThisWay OrEvenThisWay. i happen to belong to the former camp.

-- sven

[identity profile] neuromancerzss.livejournal.com 2008-01-29 06:49 pm (UTC)(link)
Readability is not the only measure of a naming convention, though it does seem like your point was actually specifically about readability.

[identity profile] londo.livejournal.com 2008-01-29 07:04 pm (UTC)(link)
I used to use camelCase, but sometime in the past couple years switched to with_underscores without any observable stimulus.

[identity profile] juldea.livejournal.com 2008-01-29 09:38 pm (UTC)(link)
Underscores are easier to read, but I admit they're painful to look at and type.

[identity profile] etherial.livejournal.com 2008-01-30 02:42 am (UTC)(link)
Aren't "easier to read" and "painful to look at" almost, if not quite, mutually exclusive? In my case, the underscores draw my eye down at the end of each word, making it feel like it takes a lot longer to read and interpret. I-would-think-hyphens-would-be-both-easier-to-type-and-easier-to-read.

[identity profile] juldea.livejournal.com 2008-01-30 12:49 pm (UTC)(link)
Nope. "Easy to read" is "I can tell words apart easier by using them," "painful to look at" is "not really aesthetically pleasing." One is form, one is function.

Hyphens are harder to read. The dash being in the middle of the vertical space reads as part of the word and not a separator, to my mind at least.