Perl is worse!

Martijn Faassen m.faassen at vet.uu.nl
Thu Jul 27 13:56:55 EDT 2000


Steve Lamb <grey at despair.rpglink.com> wrote:
> On Thu, 27 Jul 2000 08:44:12 GMT, Jonathan <theebh at yahoo.com> wrote:
>>Python's syntax now seem much 'cleaner' and intuitive. But then i guess
>>you all shld have known this by now:)

>     All depends on your point of view, really.  I actually prefer inline REs
> and so far the lack of automatic type switching in Python has nailed me a few
> times on a fairly simple script.  I prefer Perl because I don't have to think
> about what the data is specifically.  Either it is scaler, a list or a hash.

[snip example]

>     Maybe I am missing something, I mean this is my first script after "hello
> world" and I've only got the Beazley book but I never hit those problems in
> Perl.

Hmm. You seem to expect that strings and other
things will be automatically coerced to integers whenever a function
expects an integer. I think that's pretty scary; when I pass in the wrong
thing to a function I *want* it to complain, as it's very likely I did it
by accident. I don't want things to work by accident. Perhaps you're
missing that this 'problem' is also a 'feature'; you get less 'weird'
bugs due to the fact that your program keeps running long after your
data got coerce-mangled to death. Python would tend to throw exceptions
as soon as it went wrong.

So perhaps you're missing the important tradeoff here.

>     I personally don't think one is better than the other and to catagorically
> state so is... limiting one's view, IMHO 

All right, for this particular case I suppose one could get used to
this kind of coercing. But in general? I'd need to *remember* it all,
right?

But I'm sure your general point makes sense; it depends on your
perspective. In a personal perspective Perl may do some things better
than Python and vice versa. Though some perspectives may be more
important than others. :)

In-particular-*my*-perspective-is-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