Case-sensitivity: why -- or why not? (was Re: Damnation!)

William Tanksley wtanksle at dolphin.openprojects.net
Sat Jun 3 14:42:27 EDT 2000


On 30 May 2000 10:59:24 GMT, Martijn Faassen wrote:
>William Tanksley <wtanksle at dolphin.openprojects.net> wrote:
>>>4. the point, that bothers me most about case insensitivity, is, that
>>>consistency in the spelling of identifiers will be lost. That means, because
>>>case doesn't count any more, why should a programmer enforce any kind of
>>>rules in the use of type case ? Why should one even consider using the same
>>>case for the same identifier in different places ? What would the right
>>>typing be anyway, if Python doesn't check it anymore ?

>> Your rhetorical questions answer themselves.  Why should a programmer
>> enforce these things?  Because it's stupid to NOT enforce them.  So
>> enforce them already!

>That's nice to say, but you don't agree with that yourself if you think
>Python's use of indentation is a good thing. It can help a lot if the
>language makes it impossible to be inconsistent. Unless you think the
>_only_ advantage of Python's indentation strategy is the lesser line 
>count.

This is a classical example of false dichotomy ;-).  I liked Python's
indentation not because it enforced consistency, but rather because it
makes code look good.  In fact, it could be argued that Python does _not_
enforce consistency; the programmer is free to choose any indentation for
each block, so long as each block can be parsed (which does require
internal consistency).

More recently I've come to realise that the reason Python indentation
looks good is that Python, like most modern languages, is a
tree-structured language, and so is best represented in two dimensions.
Most modern languages, however, attempt to represent themselves in one
dimension: an ASCII stream which ignores lines and whitespace.

So I don't really care about languages enforcing consistency; if I need
it, I'll enforce it myself.  Take a lesson from the people complaining
about Python's indentation: one of the leading false accusations is that
it's inflexible, that it won't allow people to choose thier own
indentation.

>Martijn

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list