On Thu, Jan 6, 2011 at 10:08 AM, Raymond Wan <r....@aist.go.jp> wrote:
> I use C more than Perl in my work and I definitely don't think it is
> obsolete.

I never said it was. ;) C still has very many important roles and I
wouldn't have it any other way. xD There were a lot of other people in
college that were terrified of C++ though (probably the majority of
the class), even before we were introduced to the classes and
inheritance and polymorphism, etc (so it was basically C). :P

> As Perl came after C, then one can argue that Perl aimed to
> improve on some aspects of C.  But if this argument is true, then the
> fact that Python and Ruby came after Perl would make us wonder if they
> somehow improved on Perl?  Then there's the upcoming Perl6...  It's
> all a horse race between languages, with each language influencing the
> development of others...  That's a win-win for all of us, even if
> you're just using Perl.

While all of that is true, not all languages are designed with the
same work in mind. C is great for system programming and expensive
games. It's best for software that doesn't change rapidly because C
isn't very agile or programs that get used a LOT because C programs
run fast and less time is wasted that way. Perl's main strength seems
to be text processing. In that sense, it's obviously an improvement on
C. xD However, it does run considerably slower, which does matter for
/some/ programs. The designers of each language generally have an idea
of what improvements they want to make to other languages, and they're
generally based on personal experience, which is biased by what kinds
of programs the designers write the most of. I think that's why
there's no one language to learn. While Perl probably was influenced
by C, and Python probably was influenced by Perl, Perl doesn't
necessarily solve all of the problems that C can [as well], and Python
doesn't necessarily solve all of the problems that Perl can [as well].
Again, it comes down to right tool for the job. :)

> Brandon again (sorry, maybe should have written two replies) -- I was
> going to avoid this thread but while working today, I was reading
> another program's documentation and they gave a script to run their
> program in Python.  That's when I realized that the recent program
> documentations I've seen make more references to Python than any other
> scripting language.  I don't know why.

Python is a popular language, but so is Perl. It makes sense that
you'll encounter both. Often, I think that we don't even realize when
we're running one or another. Our system doesn't need us to know what
kind of software we're running. As long as it knows how to run it the
program just works and we can't differentiate between a native program
(unless we actually investigate). I find myself occasionally doing
things like:

    $ file `which program`

To see if that program is a script, and which language it is. Matter
of fact, I'm getting an evil idea:

[bamcc...@krypton ~]$ perl=0 python=0 ruby=0; \
> \
> for f in /bin/* /usr/bin/*; do
>     for l in perl python ruby; do
>         file $f 2>/dev/null | grep -i $l &>/dev/null && ((`echo $l`++));
>     done;
> done ; echo "Perl: $perl    Python: $python    Ruby: $ruby";
Perl: 156    Python: 94    Ruby: 5

(I failed to write that in Perl; File::Type wasn't playing nice, and
the bash ended up a lot shorter too)

According to that simple (imperfect) script there are approximately
50% more Perl programs (in /usr and /usr/bin) on my system than there
are Python and Ruby programs /combined/. Of course, there are
unrelated reasons for that. I play with Perl, but really don't with
Python and Ruby, so there are a number of programs installed for Perl
development and such, many of which are quite likely written in Perl
themselves. I only recently installed ruby, and since it wasn't
installed before, obviously there weren't a lot of programs written in
it (which by itself says that Ruby isn't /that/ popular in the niche
of system tools, even if it is gaining ground). There are probably
also other variables that make these results nearly meaningless, but I
think it's fair to say that Perl isn't going anywhere. :P I would be
more interested in the results of that command-line on a fresh Linux
distro install (without customizing the packages at all). It might
even be fun to compare the results from Fedora, Debian, and Gentoo.
\o/


-- 
Brandon McCaig <http://www.bamccaig.com> <bamcc...@gmail.com>
V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl.
Castopulence Software <http://www.castopulence.org/> <bamcc...@castopulence.org>

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to