in reply to What I Did Today To Prove Perl Beats C

Be wary of over generalization. My counter example for the day is SNMP. If you have never played with it, don't. Suffice to say that part of SNMP involves a great deal of bit twiddling.

In my shop, we had a set of utilities based on a pure perl SNMP solution. When I was asked to upgrade and fix the utilities, I immediately freed perl from its bondage and made C do the bit-twiddling via the ucd-snmp libraries and the SNMP module.

The utilities which previously took minutes to run now take mere seconds.

To every language its baliwick; elegance results when each is used in its strength to solve a problem.

Mik
Mik Firestone ( perlus bigotus maximus )

  • Comment on RE: What I Did Today To Prove Perl Beats C

Replies are listed 'Best First'.
RE: RE: What I Did Today To Prove Perl Beats C
by Adam (Vicar) on May 24, 2000 at 20:14 UTC
    How does this prove Perl superiority?

    It looks to me like it proves that C is good for something (which we knew... almost every language {except lisp} that is in use is in use for a good reason.)

      Those who don't learn from history are doomed to repeat it. While you bash Lisp, the great Perl hackers are trying hard to imitate it.
      • Lisp was the first language implemented in itself -- the first one to have an eval function at all!
      • Lexical scope and closures (my() and anonymous subs, respectively) were invented in Scheme (25 years ago).
      • Lispers were early adopters of OO. In the early 70's we already had excellent OO extensions such as LOOPS, and today's full-featured Common Lisp specification includes a Common Lisp Object System which is incredibly complete and flexible (not to mention complex!).
      • Where'd you think map() came from? What about grep()? (Of course, it's called filter in scheme...)
      • Hell, even the idea of lhs subroutine calls (new as of Perl 5.6) came up in Lisp - some good 30 years ago, even! But why linger in the past? :) The features which are standard in R5RS-compliant Scheme implementations today (e.g. continuations, promises, hygienic macros, even the trivial but enormously useful let variants for scoping with variables), as well as some of the nicer ones from particular extensions (e.g. logical programming and soft pattern-matching-based typing as in Schelog) just might find their way into Perl 7.0, ten years from now. (Only in an uglier, more C-ish way, of course. :))
        Evidently I'm a big idiot, as I closed the <UL> tag too late. Here it is, reformatted:
        Those who don't learn from history are doomed to repeat it. While you bash Lisp, the great Perl hackers are trying hard to imitate it.
        • Lisp was the first language implemented in itself -- the first one to have an eval function at all!
        • Lexical scope and closures (my() and anonymous subs, respectively) were invented in Scheme (25 years ago).
        • Lispers were early adopters of OO. In the early 70's we already had excellent OO extensions such as LOOPS, and today's full-featured Common Lisp specification includes a Common Lisp Object System which is incredibly complete and flexible (not to mention complex!).
        • Where'd you think map() came from? What about grep()? (Of course, it's called filter in scheme...)
        • Hell, even the idea of lhs subroutine calls (new as of Perl 5.6) came up in Lisp - some good 30 years ago, even!
        But why linger in the past? :) The features which are standard in R5RS-compliant Scheme implementations today (e.g. continuations, promises, hygienic macros, even the trivial but enormously useful let variants for scoping with variables), as well as some of the nicer ones from particular extensions (e.g. logical programming and soft pattern-matching-based typing as in Schelog) just might find their way into Perl 7.0, ten years from now. (Only in an uglier, more C-ish way, of course. :))
        There it is now... :)
        So I ran your post through my LISP compiler and it complained about mismatched-parens.

        Ok, I was joking. (I know Lisp has its uses. (My AI class in college was taught in Lisp, as were several other courses.) But it gets so convoluted (and complicated) so quickly, what with all those parens (and lambdas (and lets (and prefix notation(although prefix notation is more literal))))).

        What the hell are you talking about? Who is bashing Lisp? Nothing is wrong with Lisp (meaning it has its uses). Perl is know for, and was partially born from, taking what is best in various languages and put them together. Are you next going to say we are trying to immitate C?

        Cheers,
        KM

      Well, yes. That was my point. Perl does not "beat" C. Perl solves certain problem spaces better than C, but C solves certain problems spaces better than Perl. Mine was a cautionary tale.

      mikfire

        A good point, but I'm not sure that the first post in this node proves anything easier. So I guess I'm saying I agree with your statement but not your argument. "Be wary of over generalization."