Perl is worse!

Steve Lamb grey at despair.rpglink.com
Fri Jul 28 19:02:52 EDT 2000


On Fri, 28 Jul 2000 23:09:56 +0200, Alex Martelli <alex at magenta.com> wrote:
>I hope you remember that in Python there's no need for the joining
>and later re-splitting: just putting the pair (tuple) in there is
>so much easier and more natural.

    No.  I am learning that.  A plesant side effect of this excellent
discussion.

>Among other things, it makes it easy to save/load/change a format-string;

    Nono, you misunderstand me.  I prefer the Pascal notion of variables in
place in the string with formatting attached to it instead of placeholder
formatting strings with the variables hanging off the end of the string.
Pseudo code from no language, bear with me.

"Here is a string with ",$a:d:0:0," variable in it."

"Here is a string with %d:0:0 variable in it.",$a

    In the former I read and I see, "Oh, $a goes here with this formatting"
whereas in the latter it is "Oh, here is the formatting for...  uhm.. $a."

    Again, simplistic and not in any language, but taken to the extreme you
can see the problem.

"%d:0:0 %c:U %s %s %s %s %d %s %s %s \
%d:0:0!",$a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k

    What variable goes with what again?

>You just don't have to put strings together, to split them up again later, as
>much as is usual in Perl (it was _mandatory_ in Perl 4, which had no rich
>data structures; it's still _popular_ in Perl 5, for various reasons).

   Simplicity.

>Why else would I have been so happy, so utterly happy, to leave 8 years of
>Perl experience behind and start over from scratch with Python?

    Masochism?  :)

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list