Mark Wooding a écrit :
Russ P. <[EMAIL PROTECTED]> wrote:
The idea of being able to discern properties of an object by its name
alone is something that is not normally done in programming in
general.
Really? You obviously haven't noticed Prolog, Smalltalk, Haskell, ML,
or Erlang then. And that's just the ones I can think of off the top of
my head.
* Prolog and Erlang distinguish atoms from variables by the case of
the first letter; also `_' is magical and is equivalent to a new
variable name every time you use it.
* Smalltalk distinguishes between global and local variables according
to the case of the first letter.
* Haskell distinguishes between normal functions and constructors
(both data constructors and type constructors) by the case of the
first letter, and has Prolog's `_' convention.
* ML allows a single-quote in variable names, but reserves names
beginning with a single-quote for type variables. It also has
Prolog's `_' convention.
You could add Ruby's naming rules here. Or the very very common
convention of using ALL_UPPER for symbolic constants (or
pseudo-constants as in Python). And *quite a lot* of other either
cross-language or language-specific naming conventions.
--
http://mail.python.org/mailman/listinfo/python-list