My name is Variable.

The subject of variable naming came up on the KinoSearch mailing list a little while back. This blog entry started off as part of an email reply to that thread, but then I thought better of it...

As a base, I agree with all the general rules regarding names laid out in the Slash Style Guide:

The only qualification I would make is that the preference for underscores over CamelCase is language-dependent — for instance, CamelCase is preferable for Java and JavaScript.

On top of those, here are a few more:

Each of these rules is made to be broken, of course... but collectively, they seem to have served me well.

posted 2007-Sep-05 20:53 :: permalink

Copyright © 2004-2007 Marvin Humphrey