Language change and code breaks

Neil Hodgson nhodgson at bigpond.net.au
Sat Jul 21 19:50:10 EDT 2001


Justin Sheehy:

> Guido van Rossum <guido at python.org> writes:
>
> > If you use this a lot (message = Message() etc.) your code is less
> > readable than it should be.
>
> Really?  People use capitalization semantically all the time, both in
> programming and in the rest of life.  I don't understand at all what
> makes the above code unreadable.

   I find code like this harder to read and reason about. There are multiple
entities with the same name so you have to remember to think about some
extra details. While example code that looks like m=M() is at the low end of
difficulty, stuff like:

   caterpillar = Caterpillar()
   # ... lots of code ...
   egglets = caterpillar()

places more strain on my poor brain.

   _In_ written English, a change _in_ capitalisation is not always a change
of meaning as it is most often done for sentence formation.

   Neil






More information about the Python-list mailing list