[Israel.pm] Python talk

Yuval Yaari yuval at windax.com
Mon Dec 6 16:10:33 PST 2004


Omer Zak wrote:

>I am one of those who programmed in Perl and later switched to Python.
>
For how long did you use Perl?
How frequently?
Did you pass the basic level? (I'm asking this seriously)

[...]

>My best guess is that it is because Python has a more intuitive way to
>represent nested data structures.  If one wants to represent an array
>(list in Pythonesque) of associative array (dict in Pythonesque) elements
>whose keys are themselves immutable arrays (tuple in Pythonesque) - it is
>very intuitive to represent it in Python.  In Perl one would have to deal
>with references and other yukky stuff which I didn't get around to master.
>
This answers one of my first questions.
Nested data-structures is rather basic.
I think most people get to use it on a daily basis.

Python is generally not intuitive. I once thought about learning it (and 
dropped that idea after actually looking at the language, sorry) and its 
syntax is very weird.
You must know Python in order to read it, whereas I often see C/C++ 
people "understanding" Perl very easily.

I still can't see what's "yukky" about references, isn't it the same in 
Python? Care to give us a small snippet?

>Informal survey among Perl programmers:
>1. How frequently do you have the need to represent complicated and nested
>   data structures in your routine software development work?
>
As I just wrote: a few times a day, every day.

>2. If you do have the need for such data structures, do you go on and bite
>   the bullet or somehow work around it by other means such as blessing
>   objects?
>
Why do you make it sound so complicated?
The thing is that it's so basic. We don't bite the bullet... (I 
personally even enjoy it, but that's me).
Generally, an object is a blessed data-structure, so there's virtually 
no difference (ok, I know there is, but I'm just trying to simplify things).


  --Yuval



More information about the Perl mailing list