http://qs321.pair.com?node_id=305882


in reply to Arguments needed for comparision between Perl, ASP and Java

You will find that some programmers can be quite fanatical about their choice of programming language to the point that they no longer see the reasons why anyone should choose another language to program in. And while there may not be that much of a problem with that, programmers sometimes lose sight that the best programming language is the programming language that does what you need it to do quickly and efficiently. The best tool for the job.

Perl is a very good programming language to solve general-purpose problems involving 90% text and 10% just about everything else. It's used for CGI on websites, it's used with databases, it's used with XML and many other things, as a poke around CPAN or PerlMonks will tell you.

Java, on the other hand, is a completely different type of programming language, in that it's object-orientated. That doesn't mean that Perl and Java couldn't solve a given problem, but it just means that there are some things Java could do better than Perl, and vice versa.

ASP is a technology that enables you to make dynamic and interactive web pages, using server-side scripting to dynamically produce web pages that are not affected by the type of browser the web site visitor is using. The default scripting language used for writing ASP is VBScript, although you can use other scripting languages like JScript (Microsoft's version of JavaScript). Perl can do what ASP can do, but Perl is more general-purpose than ASP.

If you really want to know whether Perl is better than language x, learn them both (or, even better, persuade those who prefer language x to learn Perl :) ) and try to solve the same problem in both of the languages, and then see which one you start to use more when tasks need to be done.

And remember, if there was a superior programming language, everyone who's anyone would be using it ;)

--
rozallin j. thompson
The Webmistress who doesn't hesitate to use strict;

Replies are listed 'Best First'.
Re2: What do I say?
by bbfu (Curate) on Nov 10, 2003 at 17:47 UTC

    I'd just like to add that you can even use Perl with ASP, via either Apache::ASP, or by installing PerlScript on an IIS server.

    bbfu
    Black flowers blossom
    Fearless on my breath

Re: Re: Arguments needed for comparision between Perl, ASP and Java
by BUU (Prior) on Nov 11, 2003 at 08:15 UTC
    I'm afraid I take issue with several of your points:

    Java, on the other hand, is a completely different type of programming language, in that it's object-orientated. That doesn't mean that Perl and Java couldn't solve a given problem, but it just means that there are some things Java could do better than Perl, and vice versa.

    A) I don't think you can call any language 'object oriented'. OO is a design style, not a function of the language. You can write OO code in C and write procedural code in java. Granted in general it's much easier to write OO in java and procedural in C, but it doesn't make C a 'procedural language' or java an OO language.

    B) Perl has just as many OO'ish features as java does, you could write every single thing as a class if you wanted to. (Well, except for a line that looked like package main; new module;.)

    C) If you really wanted to find the differences you should note that java is a much lower level/stricter programming language, meaning that you have to manually deal with datatypes such as int or char, and once you declare something an int it stays an int and so on. (lets not get in to scalar datatypes, or object inheritance issues). Java has a number of other differences but I find that to be the most important one.

    ASP is a technology that enables you to make dynamic and interactive web pages, using server-side scripting to dynamically produce web pages that are not affected by the type of browser the web site visitor is using. The default scripting language used for writing ASP is VBScript, although you can use other scripting languages like JScript (Microsoft's version of JavaScript). Perl can do what ASP can do, but Perl is more general-purpose than ASP.
    ASP, atleast in my somewhat limited understanding, is a frame work for CGI type applications that allows a number of different languages access to a number of basic methods and data, such as form data and session handling (I think). It also lets these different languages work together much closer then without it, passing datastructures back and forth and so on (Again, I think).
      A) I don't think you can call any language 'object oriented'. OO is a design style, not a function of the language. You can write OO code in C and write procedural code in java. Granted in general it's much easier to write OO in java and procedural in C, but it doesn't make C a 'procedural language' or java an OO language.

      A) Oh, I think you can. An OO language is one that supports object oriented semantics at the language level. Java does, C does not. I will agree that one can program in either an OO or procedural style in either language, but that doesn't make Java more procedural nor C more OO.

      C) I also agree that Java's meaningful differences from Perl have nothing to do with OO. But 'static' vs 'dynamic', comes to mind.