On Sat, Sep 25, 2010 at 01:00:29PM +0200, Arnold Krille wrote:
On Saturday 25 September 2010 10:49:35 Chris Cannam
wrote:
On Sat, Sep 25, 2010 at 8:06 AM, Joel Roth
<joelz(a)pobox.com> wrote:
I guess I am reacting to what I imagine is
language
preference projected onto absolute judgment on merits of a
particular language.
Perhaps you are speaking from years of software development
experience.
I have quite a lot of (mostly enjoyable) experience writing Perl over
the years, including some fairly big programs, and hardly any
experience with Python (a language I dislike on instinct). But my
experience with Perl has been that returning to my own projects is
harder than it should be, and harder than in languages like C and C++.
That is probably due to my own limitations, particularly when it
comes to discipline, but it's empirically true in my case.
The real assumption I made back there was that Python code is any
easier to return to -- I haven't the experience to judge, really, I'm
just going on hearsay from friends and acquaintances.
Python actually forces you to be more disciplined. Which really make returning
to the code easy.
I believe that's the philosophy that there should be one
right way to approach a particular task. Perl suffers (and
benefits) from its motto TIMTOWTDI (pronounced tim-toady --
this is more than one way to do it.)
Using python for small apps/tools is easy. Using
python for large projects is
easy.
Extending your C/C++-project with python is easy.
Using your own C/C++ parts in python is easy.
That's a big advantage of python over perl right now: python's
ctypes library. There is a project now to port ctypes to
perl.
Perl had previously borrowed Python's object mechanism. Just
now it is finally being replaced, by Moose/Mouse in Perl 5,
and the internal object system in Perl 6.
I, for one, have had a great time with the python-derived
perl object system.
Otherwise, perl's vast CPAN libraries, cover many problem
domains.
Porting parts of your python project to C/C++ is easy
(think prototyping in
python and port to compiled-language once the interface is finished and the
optimizations begin).
For optimizing perl, we have Devel::NYTProf, which
profiles the time spent in each subroutine. (As the name
suggests, the New York Times underwrote the development
costs.)
I for one am very glad I learned python a few years
back. Its fun.
Good for you! So is perl. :-)
I thought I would like to learn some other language, either
python, ruby, Tcl or Forth, but usually I have some
practical problem to get done, and the more familiar
language gets used.
Disclaimer: I don't have any experience in perl,
but what I get from the perl-
snapshots in German Linux-Magazin, it looks harder then python...
Perl does have a few syntax quirks. The deferencing syntax
is particularly awkward. There is also the oddity (and
feature) of list/scalar context.
For me, reading music is awkward, and so is reading python,
but I don't blame the notation in either case.
Best,
Joel
Have fun,
Arnold
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user(a)lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user
--
Joel Roth