[Israel.pm] Python talk

Shlomi Fish shlomif at iglu.org.il
Wed Dec 8 02:15:38 PST 2004


On Monday 06 December 2004 13:30, Omer Zak wrote:
> I am one of those who programmed in Perl and later switched to Python.
>
> It is my feeling that the question why some people prefer Perl and others
> prefer Python (or Ruby) is an interesting question, worthy of
> investigation.
>
> Personally, I like the culture around Perl (it's why I am subscribed to
> this mailing list and to some other Perl-related mailing lists).  However,
> when actually programming, I prefer Python to Perl.
>
> 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.
>

1. Tuples are not really arrays. They are an ordered set of elements. A pair, 
which is a sub-case of a tuple is common in LISP as the (cons a b), (car 
pair) and (cdr pair) thing.

2. It is very intuitive to represent nested data structures in Perl. I got the 
hang of it in the first few days I programmed in Perl, and used it from the 
start. You should remember that in Python every array and hash is a 
reference, and Perl, for convenience, contains support for some 
non-dereferenced data like that.

> 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?

Very frequently.

> 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?
>

I don't know if "I bite the bullet" but I certainly implement them like that 
without avoiding anything. 

Regards,

	Shlomi Fish

> I don't think it is a social thing but one of personal preference.
>
> On Mon, 6 Dec 2004, Gabor Szabo wrote:
> > I am glad as I think the opinion on the list really fit mine.
> >
> > Regarding the strong opinions.
> >
> > I don't have them regarding Perl or Python or Ruby.
> > They are all nice languages with a lot more common than it seems
> > from the debates. Technically theyare all very similar.
> > I told you I don't have strong opinion here and not much knowledge
> > either.
> >
> >
> > What is very different IMHO is the state of mind of the programmer.
> >
> > There is the camp of the One True Way and the other camp of TMTOWTDI.
> >
> > I prefer the world where (I think) I can make my decisions and no
> > organization or culture forces its way on me.
> >
> > So I'd say it is a social thing.
>
>                                              --- Omer
> "Does God exist?" is properly answered by psychological inquiry rather
> than by investigation of objective reality.
>                              (one of the unsaid sayings of Lazarus Long)
> The truth of statements like "Programming language X is the best one"
> is properly evaluated by cognitive psychologists rather than by computer
> scientists.
>                                            (an unnamed R.A.Heinlein fan)
>
> My opinions, as expressed in this E-mail message, are mine alone.
> They do not represent the official policy of any organization with which
> I may be affiliated in any way.
> WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl

-- 

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

Knuth is not God! It took him two days to build the Roman Empire.



More information about the Perl mailing list