[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Saving a table in file
- From: Philippe Lhoste <PhiLho@...>
- Date: Wed, 10 Mar 2010 10:21:46 +0100
On 09/03/2010 19:22, Petite Abeille wrote:
A naming convention I picked back in my obj-c days:
http://cocoadevcentral.com/articles/000083.php#7
E.g.:
-- archetype, class, module, etc
local DB = require( 'DB' )
-- specific instance
local aDB = DB( 'sqlite://' )
At my work, they kept the habit from MSVC days to prefix, in Java, object instance by the
abbreviation of the class name, eg. ArrayList instance would be alCustomers and so on.
Bad or not (bad when you meet a vCustomer array list because it was a Vector...), that's
the local rule.
Some people were lazy and just use a and the prefixes: aCustomer, anIterator, theManager
Which I find even more atrocious than the Hungarian notation...
That, and the overused myXxx...
At least, the office rule conveys some useful information (although it can be outdated if
refactoring isn't properly done), while the Cocoa convention you show (I just see they set
that as a common convention) and the habit developed (independently) by my co-workers,
just tend to make all the variables looking the same and hinder readability.
Oh, well, that's better than the toto, titi, tata variables French programmers use often
when they lack imagination, not unlike foo, bar, baz...
At least I prefer ga, bu, zo, meuh... :-P
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --