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

Martijn Faassen m.faassen at vet.uu.nl
Wed May 24 07:21:14 EDT 2000


Andrew Henshaw <andrew.henshaw at gtri.gatech.edu> wrote:
> Martijn Faassen wrote:
[snip my indentation argument]
>>Do you, or do you not, think about Python's indentation system this way?

> You've (basically) made this argument in other threads, but I'm glad it showed
> up here so that I could address it in this same context.

Okay. I've been pushing it for a while now to get it into Python's
meme space.

> Python's indentation rules provide for instruction grouping.  There **must**
> be some mechanism to indicate grouping, and indentation fills that need in
> Python.   If indentation is not used, then block tokens are commonly used.  
> These are both acceptable solutions to the problem.  Your argument
> seems to be incomplete in that you haven't provided a replacement solution to
> the grouping problem.

Naturally this would be block tokens, indeed.

> Given this argument, one must ask "Indentation
> provides a reasonable solution to a difficult compilation problem, what
> difficult compilation problem is solved by case sensitivity?"

Consistency again. block tokens are the accepted way in almost all
programming languages to group instructions. Python for some reason uses
indentation. What is this reason?

  * it looks better (once you're used to it) shorter, just as readable

  * we get more consistent indentation practices, as it *matters*

> Perhaps your solution to instruction grouping is recognition of grouping by
> context.  If your carefully chosen example was representative of most code
> then I would, perhaps, agree with you.  However, if your code stopped with the
> second print statement, or was not an artifically-separated sentence, then I
> would say that the flow of control was ambiguous.

Why do people want case sensitivity?

  * it looks better if cases are consistent

  * we get more consistent case-spellings, as it *matters*

(the third reason is to be able to have more possible 'names')

I'd still maintain indentation and case-spelling have very many parallels. If
you indeed think that Python would've been just as nice with block tokens,
go ahead and argue for case insensitivity (or whatever you like). If you 
however think the indentation rules *add* to Python's readability/consistency,
then most arguments for case insensitivity seem to fall apart.

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list