[uf-discuss] lower-case instead of camelCase

neuro at 7el.net neuro at 7el.net
Fri Oct 28 14:09:46 PDT 2005


On Fri, Oct 28, 2005 at 01:59:43PM -0700, Tantek Çelik wrote:
> On 10/28/05 1:17 PM, "Ryan King" <ryan at technorati.com> wrote:
> 
> >> 
> >>     Is word-word the preferred format for classes in microformats?
> >> Personally, I usually use camelCase, but if there's already a
> >> convention, we'll stick to that.
> > 
> > I think many of use have found that using all lower case works much
> > better on the web, so its become a rule-of-thumb for developing
> > microformats (maybe this needs to be on the wiki somewhere?).
> 
> The http://microformats.org/wiki/hcard-parsing page touches on this, and
> refers to a couple of other resources that explain more.
> 
> I agree that this merits addition to the wiki in a more
> obvious/discoverable/referencable place.
> 
> We use lower-case names, properties etc. in microformats themselves *and* in
> the wiki page names as well.
> 
> Some of the thoughts behind this:
> 
> Frankly: camelCase is a programmer idiom that is not very user friendly to
> "typical useres".   dashed lower case is much easier to read.
> 
> Case sensitivity.  mixedCase is a problem for the reasons Pilgrim mentions
> and more.
> 
> Search engine indexing.  dashed-lower-case file names are better indexed by
> search engines than camelCase names which are currently NOT broken up in to
> separate words by indexers.  Frankly, the use of CamelCase for wiki pages
> probably made the wrong compromise between findability and authorability.
> 
> Again, these are just thoughts, and probably deserve further exploration,
> but there you have some of the raw reasoning behind it.
> 
> Thanks,
> 
> Tantek

Hello,
using both camelCase and dashed lowecase when developping, depending on
the context, I'll add just one thing to the pretty complete description
Tantek made: dashed-lowercase names are really much easier to read for
a human being, specialy when you go through thousand lines of code.

Using camelCase is a good thing only when the dash is used as a keyword
by the language you're programming in or when you need to distinguish 
some very particular words in the code like class or functions declaration. 
Used too much, it makes the code pretty harder to read when it does not
obfuscate it. 

Regards,
Frederic



More information about the microformats-discuss mailing list