language aesthetics

Fernando Perez fperez528 at yahoo.com
Fri May 16 20:57:17 EDT 2003


Nick Vargish wrote:

> "Ulrich Petri" <ulope at gmx.de> writes:
> 
>> There is a saying in german: "Das rollt mir die Fußnägel hoch..."
> 
> I have no idea what that means, but:
> 
>     sub swap (*@_ is rw) { @_[0,1] = @_[1,0] }
> 
> Is going to be giving me nightmares tonight. :^)

Nothing like the readability of python:

In [64]: def swap(L): L[1],L[0] = L[0],L[1]
   ....:

In [65]: a=[3,4]

In [66]: swap(a)

In [67]: a
Out[67]: [4, 3]


That page just confirms the wisdom of having moved away from perl a few years
ago :)  I still use it occasionally, for small, tight things were a couple of
quick regexps are all it takes to get a job done.  

But reading that page gave me the feeling that perl is going down a road which
leads straight to madness, in an orgy of syntax and notation like the
programming world has never seen before.  Oh well, we'll see...

Cheers,

f.




More information about the Python-list mailing list