case sensitivity and XML

Neel Krishnaswami neelk at brick.cswv.com
Tue May 23 18:23:05 EDT 2000


Fredrik Lundh <effbot at telia.com> wrote:
> Randall Hopper <aa8vb at yahoo.com> wrote:
> > Reading BASIC and Pascal code for several years taught me (among other
> > things) that case insensitivity isn't the better way.
> > 
> > whY do WE Have RULES fOR capiTALIZation IN lANGUAGES?  Because it makes
> > them easier to read and comprehend.
> 
> so why not enforce these rules, just like we're enforcing the
> indentation rules:
> 
>     >>> class foo:
>     SyntaxError: Class name should be Foo
> 
> (if not else, that should make martijn happy, right? ;-)

Actually, this is exactly what Haskell does; type names *must* begin
with a capital letter and variables *can't* begin with a capital
letter. 

(For the curious: partitioning type and regular variables into
different namespaces makes life easier for the language designers, who
then doesn't have to worry about what it means when a type name is
shadowed by a value binding, since Haskell types only have meaning at
compile time.)


Neel



More information about the Python-list mailing list