Python Rocks!

Martijn Faassen m.faassen at vet.uu.nl
Wed Jan 19 16:33:04 EST 2000


tye4 <tye4 at yahoo.com> wrote:
[snip]
> Don't get me wrong. Indentation tremendously improves readability. However,
> it should not be part of the language. That way, we don't have to put an
> immense amount of effort just trying get everything into the right block.

Argh! You discovered Python's terrible hidden weak spot! I don't know why
the Python Secret Underground hasn't 'silenced' you yet, usually we..um..
_they_ are so efficient.

The evil alien whitespace eating nanoviruses -- when the evil aliens 
release them -- will destroy Earth's Pythonic infrastructure completely. We'll
all have to revert to Perl and C. It'll be incredibly disastrous. However,
knowledge of the evil alien whitespace eating nanites is *classified*. It's
stored in our highly secret high tech 'timbot' system. I don't know how you
ever found out, unless timbot has been 'leaking' to Usenet again. We've
fixed that particular bug a thousand times before, but somehow timbot has
this odd tendency to find new ways to leak. Shouldn't have written it in Perl,
I suppose..

Guido van Rossum, under the guise of the Computer Programming For Everybody
Project, is doing DARPA funded research into protecting the Earth from this 
bizarre and evil alien threat. He and a small team of PSU-ers are putting
an immense effort into developing advanced heuristic algorithms that can 
hopefully manage to keep everything in the right block. (the timbot is
an early offspin of this project).

And you give it all away!

> There is not single programming language that forces such a bizarre
> indentation rule.

You are right -- Python, since version 1.5.1 actually moved towards the
use of _invisible_ block delimiters. You can't see them, but they are 
there, the solemn, faithful guards against the day the aliens release their
nanovirus. Whenever the 'python' executable imports an earlier Python
module without such invisible guards it will silently add them. It uses
a subtle compression technique, designed by the timbot, that ensures the byte
count of the source file remains exactly the same. JPython uses an 
optimizing 'just-in-time' hotspot compiler based on secret transmeta
technology to do the same. Viper uses ocaml as its implementation language,
which due to advanced type-inference does not have this problem at all.

And you give it all away!

> If thousands of programmers have a problem with this, why isn't it fixed.

But it is! The project is merely _secret_, for a very good reason.

And you give it all away!

And now it may be too late -- the aliens are already onto us. They'll 
design _new_ nanoviruses that eat block delimiters instead. Suddenly your
C code is unsafe! Behold the drama:

if (foo == bar) {
  printf("bar!\n");
  if (foo == baz) {
    printf("Also baz!\n");
  }
} else {
  printf("nonbar!\n");
}

an evil alien delimiter eating virus passes by and eats some delimiters,
and ooh! the semantics have changed:

if (foo == bar) 
   printf("bar!\n");
   if (foo == baz) {
     printf("Also baz!\n");
} else {
  printf("nonbar!\n")
}

Can the Earth be protected from this menace? Will the League of Dynamic C
Coders come up with a way to add the missing delimiters? They can't depend on
whitespace to do it -- the aliens have a weapon against this already.

In fact, Python with its invisible block delimiters might be the language
language to stand! You wouldn't want that to happen, do you?

Let's all continue on the PSU's path, as Guido indented.

no-I-really-can't-be-serious-about-this-ly yours,

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