Getting into Python, comming from Perl.

Nick Craig-Wood nick at craig-wood.com
Mon Apr 25 05:30:02 EDT 2005


Miguel Manso <mmanso at amplitudenet.pt> wrote:
>  I'm a programmer with 5 year of experience into Perl. I'm on that point 
>  where you resolve problems without thinking on HOW you'll do it with 
>  that language but only on the problem itself.
> 
>  Since Perl 6 started I've been following it. The conclusion I have is 
>  they're making a whole new language and I'll have to learn it.

I have had a similar experience.  Actually it was Perl 6, and and
particular this chart

  http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html

that made me think that Perl was leaving the rails, and it was time to
jump ship (to mix my metaphors).

That was over a year ago now, and me and my colleagues haven't looked
back.  Yes there was a small amount of retraining, but conceptually
Perl and Python aren't that far apart, its mostly a matter of syntax.

The philosophies of the two languages are quite different though.
Perl's TIMTOWTDI is diametrically opposed to Python's "There should be
one - and preferably only one - obvious way to do it" and I think that
is a major advantage when building bigger programs.  Type "import
this" at the Python interactive prompt to see more about Python's
philosophy, and note that it seems like a direct reaction to Perl's
baroque-ness.

One thing I've definitely noticed is that Python had made me a better
OO programmer.  Its so clunky making objects in Perl that I almost
never did except when making a library.  In Python its so easy that I
don't have to think about it.

>  This being said and, since I've to learn a new language, I've
>  started thinking in a new language. I've noticed Python is getting
>  more and more developers and many projects are being made.
> 
>  I've tryed to use python some times but I get frustrated very quick. I 
>  get myself many times needing to figure out how to loop through a list, 
>  declare an associative array, checking how to pass named parameters to 
>  functions, and simple things like that.
> 
>  What I would like to know is if anyone had these problems and if you can 
>  share that experience with me. I'm trying to minimize my
>  "frustration" :)

I like to read books to retrain myself.  That may not be your way, but
if it is I'd recommend "Dive into Python" by Mark Pilgrim as a good
first step.  Its available for free in electronic form too.  After
that you could read Programming Python.

Good luck!
-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list