[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: camelCase or under_score ?
- From: Philippe Lhoste <PhiLho@...>
- Date: Thu, 31 Mar 2011 13:53:32 +0200
On 31/03/2011 08:41, Brian Maher wrote:
And why not lex_HTML_to_XML?
This example is a bit contrived, focusing on mixing uppercase abbreviations with normal words.
And, maybe I am too used to camel case, but I still find the first one more readable than
the others... ^_^'
Readability is indeed subjective.
Some people find languages which are case insensitive easier to use (I disagree... :-)).
And a language, Nimrod, even went as far as making the three (four with mine) examples
above... addressing the same variable!
Otherwise, while I adopted camel case for my needs, I go with the other people, I just
stick with conventions used in the code I hack...
About library design: it is indeed a compromise. With a very large API like Qt or,
perhaps, OpenGL, it is both simpler and sensible to use the naming and idioms of the
existing code base (with adaptations if made in a consistent, logical way like dropping
type differences, etc.). It is easier to adapt existing code or too look up information.
With smaller APIs, like LuaSocket, it is nice to adapt the existing, probably too
idiomatic API, to idioms of the language implementing it (multiple return values,
iterators, tables, etc.).
-- (near) Paris -- France
-- -- -- -- -- -- -- -- -- -- -- -- -- --