Why use Perl when we've got Python?!

John W. Stevens jstevens at basho.fc.hp.com
Sat Aug 14 05:04:55 CEST 1999


> 
>      [courtesy cc of this posting mailed to cited author]
> 
> In comp.lang.perl.misc, 
>     "John W. Stevens" <jstevens at basho.fc.hp.com> writes:
> :> But the point is that Python refused to autoallocate for you.
> :
> :Excuse, but Python did indeed automatically allocate on:
> :
> :a.append( b )
> :
> :Will automatically allocate a space for a new element in the container
> :class object 'a'.
> 
> Sometimes it autoallocates on assignment.  Sometimes it doesn't.
> This is obviously inconsistent.

So much for freedom. . . and this from a Perl guru!

The differences are based on the differences between an object of
one class, vs. an object of another class.

By your reasoning, Perl is very, very inconsistent (since not every
data type supports '+').

> Perl, however, is perfectly consistent
> here across all assignment operations, and Python isn't.

Which represents a flaw in Perl.  Different classes should/must
treat "assignment" in different fashion.

> It's as clear
> as that.

Yes.  It is.

John S.





More information about the Python-list mailing list