[Tutor] Should this be a list comprehension or something?
Sean Perry
shaleh at speakeasy.net
Thu Jan 27 08:57:25 CET 2005
Brian van den Broek wrote:
> Sean Perry said unto the world upon 2005-01-27 02:13:
>
> <SNIP>
>
>> And now, for the pedant in me. I would recommend against naming
>> functions with initial capital letters. In many languages, this implies
>> a new type (like your Water class). so CombineWater should be
>> combineWater.
>
>
> Do you mean implies by the dominant coding conventions, or by language
> syntax? (Indulging the curious pedant in me.)
>
In many OO languages, it is tradition to name types with capital letters
(TFoo anyone?) and functions / methods with initial small then caps
(camelCase).
Haskell actually enforces this rule (nifty functional language). Python
and it share a lot in common.
(As an anti-example)
Erlang enforces capital letters for variable names ONLY. A little odd
and definitely takes some getting used to.
More information about the Tutor
mailing list