I think any discussion on Perl Vs Java would be lacking without some historical perspective on both.

Consider Perl's Creation: Perl was the creation of one visionary. Who did little more than come up with a language to make his own life, and those of others easier.

Consider Java's Creation: It was invented to kill Windows.

Ease of Use?

Remembering when Java first came out, it was advertised as being 'easier to use', losing many of those 'nasty features' that confounded so many programmers, Pointers, malloc/free, system calls, etc. My response to that was "So we had to invent a simpler language because our CS grads are too stupid to use the ones that we have(C,C++, Fortran, perl4/5 etc). I hear the refrain already, "by that logic you would say that you use C++ because you're too stupid to undertand assembler!" I defend my observation by saying that C offers an easier abstraction of operations than does assembler. In contrast, I don't see Java being able to abstract things that much better than C++.

But I digress

I would offer that in some respects Perl can be harder to use than Java. Darn Straight. It's also much harder to use a full featured CAD/CAM(Computer Aided Design/Computer Aided Manufacture) workstation than it is to use a paper and pencil. But the results are often worth the investment in effort.

One of the first things I fell in love with with Perl is that there are syntaxes in perl that can accomplish things with one line of code, typically involving combinations of 'map', 'grep' and slices, that take tens of lines with C/C++ OR Java.

Adoption

Perl was marketted to the community at large with not much more than, "use this, see if you like it."

By contrast, I would say that Sun's marketting of Java ammounted to at best, "Use this if you hate Windows," and at worst, "Use this, or else".

Continuing Legacy

Ever meet a hard core Perl programmer who didn't know anything more than Perl?

Ever meet a Java programmer who knew anything more than Java,and many times not even that much?

In The End

Any given language has its advantages and disadvantages. However, I think where we fall off the track is when we start to say things like "this is the LAST language you'll need." Computer languages have come and gone, but Java was the first language that I saw that dared to come out and say, "this will render all others obsolete." Well if that were true they wouldn't have to come out and say it. It would just happen on its own.

Perl was created and adopted because it was good. Java has been rammed down our throats.

  • Comment on Hype Vs Substance (Yet Another Perl Versus Java Node)

Replies are listed 'Best First'.
Re: Hype Vs Substance (Yet Another Perl Versus Java Node)
by Abigail-II (Bishop) on Oct 20, 2003 at 21:25 UTC
    Blech, this is one of the worst advocacy notes I've ever read. It's full of hype, and no substance. It's just taking cheap, unfounded, shots at Java, while in the mean time glorifying Perl (and its users), but doing so without any backing up. You sound like someone who is forced to program in Java, but doesn't have the guts to switch jobs.
    Consider Java's Creation: It was invented to kill Windows.
    Could you please provide reference that gives this statement any shred of credibility? Do you really think James Goosling created a language to kill an operating system? That doesn't make any sense.
    Remembering when Java first came out, it was advertised as being 'easier to use', losing many of those 'nasty features' that confounded so many programmers, Pointers, malloc/free, system calls, etc. My response to that was "So we had to invent a simpler language because our CS grads are too stupid to use the ones that we have(C,C++, Fortran, perl4/5 etc)
    Yeah, just like Perl loses many of the same 'nasty features'. Of course, it was invented because people were too stupid to learn C and shell coding.
    One of the first things I fell in love with with Perl is that there are syntaxes in perl that can accomplish things with one line of code, typically involving combinations of 'map', 'grep' and slices, that take tens of lines with C/C++ OR Java.
    Being able to jot it down in one line instead of ten doesn't always mean the language is better. If that would be true, we'd all be using APL (or one of its decendents). After all, we'd need tens of lines of Perl to do the same as you can do with one line of APL.
    By contrast, I would say that Sun's marketting of Java ammounted to at best, "Use this if you hate Windows," and at worst, "Use this, or else".
    SUN has a large presence on the Web. Could you provide us with some pointers showing this kind of marketing?
    Ever meet a hard core Perl programmer who didn't know anything more than Perl?
    Yep. On Perlmonks, on Perl mongers mailinglists, on 'comp.lang.perl.misc', and on other Perl forums, I often see people who think they are hard core Perl programmers, but all they know is a little bit of Web programming, and just a subset of Perl.
    Ever meet a Java programmer who knew anything more than Java, and many times not even that much?
    I know many people who program in Java I'm not worth standing in the shadow of their programming/computer knowledge. I know far, far more people programming in Perl than in Java. But from the set of people that know a lot more about programming/computers than I do, more program in Java and/or C than in Perl.
    Perl was created and adopted because it was good.
    Perl survived because it satisfied the needs for enough people.
    Java has been rammed down our throats.
    If the programming community has sense enough to let Perl survive because it's good enough, it has sense enough to kill off Java if it wasn't good enough. But Java is a big language, far, far bigger than Perl. And while SUNs marketing might have helped, they didn't put a gun to anyone's head to use it.

    I seldomly use Java, but it's a decent language. And for many programmers (including many that now use Perl), Java is a far more suitable language than Perl is. Perl requires a twisted mindset, much less than Java.

    Abigail

      Perl requires a twisted mindset...

      Darn it! You sussed me:)


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      Hooray!

Re: Hype Vs Substance (Yet Another Perl Versus Java Node)
by simonm (Vicar) on Oct 20, 2003 at 19:21 UTC

    While I also deplore the marketing hype that surrounds Java, I don't think your description of the differences between the languages is all that useful. There are some purposes for which Java is a decent tool, and bashing it doesn't really help anyone.

    Java ... was invented to kill Windows

    Not really -- from what I've heard, it was invented to open up new markets by serving as an operating system for consumer home electronics such as PDAs and set-top boxes. (Search for "Sun Oak Java History" for more details.) The "kill Windows" aspect is a later development.

    Java ... was advertised as being 'easier to use', losing many of those 'nasty features' that confounded so many programmers, Pointers, malloc/free, system calls, etc.

    As I remember it, the argument was less about "ease of use" and more about reliability and portability. For example, references aren't "easier to use" than pointers, but the argument is that they reduce the amount of time you spend debugging hard-to-understand, hard-to-reproduce error conditions.

Re: Hype Vs Substance (Yet Another Perl Versus Java Node)
by hardburn (Abbot) on Oct 20, 2003 at 20:16 UTC

    losing many of those 'nasty features' that confounded so many programmers, Pointers, malloc/free, system calls,

    Why would I want to manage memory myself? To me, that's just one more tedious job that the computer should be doing for me. While I've occationally had problems with garbage collection (usually a poorly-coded DESTROY subroutine), they've almost always turned out to be my fault.

    System calls are just something you have to live with sometime, and I have run into Java's poor support for them on more than one occation. Saying its "unportable" is silly. If the given system anything close to POSIX, they should work. If it's not close to POSIX, you'd have a hard time finding a Java VM for it anyway.

    I won't comment on pointers, since I haven't done enough C programming to get myself buried in them.

    Perl was marketted to the community at large with not much more than, "use this, see if you like it."

    Zelotry trancends languages. I don't think the Perl community gets off the hook here. Perl just doesn't have a multi-billion dollar corporation with a marketing department to match.

    Ever meet a hard core Perl programmer who didn't know anything more than Perl?

    No, but I've met plenty of PERL programmers who didn't :)

    Ever meet a Java programmer who knew anything more than Java,and many times not even that much?

    Yeah, me. I used to do everything in Java, until I got sick of its bloated API. I had learned BASIC, a little Perl, and C/C++ before hand.

    Java the Language: beautiful, clean, nearly-pure-OO
    Java the API: which ear did my brain crawl out of?

    I have a love-hate relationship with Perl OO. No implicit passing of $self, no (true) function prototyping, having to bless your reference on your own, and generally placing more of the burden on the programmer. At the same time, I realize that many of these things allow for increadibly powerful things to be done that simply can't be done in Java, or would take an increadible ammount of lines to do.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    :(){ :|:&};:

    Note: All code is untested, unless otherwise stated

Re: Hype Vs Substance (Yet Another Perl Versus Java Node)
by AssFace (Pilgrim) on Oct 20, 2003 at 18:03 UTC
    I've had to program in Java, and I've chosen to program in Perl. I have done graphical Java, simple command line classes, and J2EE. I have built blackjack systems, encryptions systems, telecom switch activation, and basica database construction/manipulation scripts - all in Java.

    In Perl I have done a lot of financial analysis and fun little projects.

    If I want to program something quickly, then I use Perl. If I want something that is OO and very easy, and speed isn't essential, but I still want it faster than Perl - then I go to Java (or if I want a UI). If I want something and speed is all I care about - then C.

    I personally have no issues with Java, and I certainly enjoy Perl - I don't see how one has to be better/worse than the other - so I guess in the end I agree with your point in that there is no reason to use one language for everything.

    That said, JavaScript is the way everything should really be done - pure power right there.


    -------------------------------------------------------------------
    There are some odd things afoot now, in the Villa Straylight.
Re: Hype Vs Substance (Yet Another Perl Versus Java Node)
by pg (Canon) on Oct 20, 2003 at 19:01 UTC

    So we are not yet tired of this ...

    After so many discussions, I now look at this in a much simpler way (although it is actually much much more complex):

    • If you want to have something done quick, it is wrong to pick Java.
    • If OO is so important to the project, it is wrong to pick Perl.
      If OO is so important to the project, it is wrong to pick Perl.

      Why?

      I could be uncharitable and claim that it's impossible to do OO right in a statically typed language, but then I'd have to explain polymorphism and that could take a while. :)

      OO is everything to me, and I use Perl. :))

      My friends,knowing my brain is OO, were very confused when I'd said "I don't use Java, but Perl." I bet they still are!

      There are psychological and ideological reasons for the choice I have maken.
Re: Hype Vs Substance (Yet Another Perl Versus Java Node)
by mdxi (Beadle) on Oct 21, 2003 at 18:16 UTC
    > Java was the first language that I saw that dared to come
    > out and say, "this will render all others obsolete."

    You do say "that I saw", but I would be remiss in my duties as a pedant if I didn't point out that PL/I's raison d'etre was to be The Last Programming Language Anyone Will Ever Need. In 1963 :)