some comments for Python 3000

Moshe Zadka moshez at math.huji.ac.il
Sun Aug 13 16:58:09 EDT 2000


On Sun, 13 Aug 2000, Roland Mas wrote:

> Moshe Zadka (2000-08-13 23:30:11 +0300) :
> 
> > > I think he meant "smallest number of *readable* lines of code." :)
> > 
> > Oh, Perl wins this one cleanly: it has *no* readable lines of code.
> 
> Oh, come on, don't exaggerate...  If you can read '#! /usr/bin/python'
> you can read '#! /usr/bin/perl' too, no?  Perl has *one* readable lind
> of code at least :-)

Ummmmm.....most people don't count comments as code. Oh, right, in Perl
#!/usr/bin/perl is actually a line of code, and it rereads it to scan for
options so if you run

perl somefile

You have no way of knowing what options perl will really run with, since
it looks at the first line of the file.

Hence, even the shebang line isn't really readable (and yours had a bug:
it should be #!/usr/bin/perl -w). Considering the fact that you had a
bug in the first line of the Perl code, while the Python line was fine,
well, QED.
--
Moshe Zadka <moshez at math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez





More information about the Python-list mailing list