Python Rocks!

tye4 tye4 at yahoo.com
Wed Jan 19 14:31:36 EST 2000


Ivan Van Laningham <ivanlan at callware.com> wrote in message
news:388521FB.BCC45087 at callware.com...
> Hi All--
>
> Aahz Maruch wrote:
> >
> > In article <8631qm$26p at news.or.intel.com>, tye4 <tye4 at yahoo.com> wrote:
> > >
> > >How hard can it be to add 'end' indicators to the language.. If these
end
> > >indicators are added, the language would still be backward compatible.
I
> > >can't believe nobody has fixed this for so long.
> >
> > Are you suggesting the addition of 'end' indicators IN ADDITION to the
> > indentation?
> >
>
> Yes, he is.  tye4, wake up and smell the tabs.  Most people who use
> Python like the indentation the way it is, and feel no need for the
> unnecessary clutter your hack would produce.  Python is not Perl and we
> don't want it to be.

You both are right. But that is not the whole story.
Say the 'end' thingies are added to Python. Now you have two types of Python
modules: ones with no 'end' (old legacy code) and others with 'end' (new
code).
A newer version of Python would compile both versions since it is backward
compatible (think of the end indicators as optional.)
As the new compiler supporting 'end' blocks comes out, the old style of
coding without 'end' will be declared as _deprecated_. As time goes on, the
code using 'end' will increase substantially while the legacy code without
'end' will reduce.

At that point, it will be safe to eliminate the _strict_ indentation rules
from the language. Without backward compatibility, all the people used the
old style will lose all their work if the language is changed.

-tye4







More information about the Python-list mailing list