Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Is Java really better than Perl???

by Vautrin (Hermit)
on Apr 20, 2004 at 18:21 UTC ( [id://346738]=note: print w/replies, xml ) Need Help??


in reply to Is Java really better than Perl???

I think that exceptions are the reason many people want Java over Perl. If you code anything in java, if there's even a chance of it screwing up -- by throwing an exception -- the compiler will yelp and whine and tell you that you need to catch SomeException e. This forces bad coders to code for the worst case scenario in the way they normally wouldn't. However, I have always thought that the java exception paradigm is rather dumb in that Java doesn't know what worst case scenarios to look for, it just guesses. A human coder doing his job properly would put in place the checks that java forces, without taking into account the checks java forces which are unnecessary. Add to that the fact that java code can be ugly, and I understand why some managers think java is better. Java, in some ways, forces coders to do better work, because there are some perl programmers out there who won't do an or die($!) when they open a file, etc. However, again, the java compiler is dumb, and this can make a coder rely too much on the compiler to catch bugs -- which may make it even harder to debug the program.

As far as the lack of an IDE goes, your manager is dead wrong. Perl doesn't have a traditional IDE like Eclipse, or Netbeans because text editors like Emacs and Vi have all the functions of a traditional IDE. Perl also comes with a debugger, and you can get a Tk based front end for that if you don't like the command like. Add to that the fact that Tk and GTK offer widget sets comparable to Java, and you have another trump to the "Perl is command line only" argument


Want to support the EFF and FSF by buying cool stuff? Click here.

Replies are listed 'Best First'.
Re: Re: Is Java really better than Perl???
by gsiems (Deacon) on Apr 20, 2004 at 19:38 UTC
      Well, I guess there are IDEs. Perhaps I would have been better off saying that you don't need an IDE. Even when I code in Java or C++, I always use Emacs and have never needed Netbeans, or Microsoft Visual Studio

      Want to support the EFF and FSF by buying cool stuff? Click here.
        That I can agree with-- even though I do toy with IDE's on occasion ;^)

        Funny thing is, I keep going back to my favorite text editor(s)...

Re^2: Is Java really better than Perl???
by adrianh (Chancellor) on Apr 20, 2004 at 21:12 UTC
Re: Re: Is Java really better than Perl???
by flyingmoose (Priest) on Apr 21, 2004 at 04:59 UTC
    Checked exceptions in java are a very BAD thing, causing programmers not to think about what they catch, so often they catch Every exception, resulting in exceptions that essentially have an empty block as error handling code, or just get logged.

    Meanwhile, traditional programming means validating error codes. If you don't do that (check return codes), you are, simply put, not worthy to demand your salary.

    There should be quite a few articles on the evils of checked exceptions on Google ... java is one of very FEW languages that has them.

      Not that I like checked exceptions at all, but...

      Checked exceptions in java are a very BAD thing, causing programmers not to think about what they catch, so often they catch Every exception, resulting in exceptions that essentially have an empty block as error handling code, or just get logged.

      Meanwhile, traditional programming means validating error codes. If you don't do that (check return codes), you are, simply put, not worthy to demand your salary.

      Surely checked exceptions and return values have the same affect at this level. A competent developer will handle all the exceptions just like a competent developer would handle all the error codes. The error code approach offers no advantage over checked exceptions apart from the fact that it's easier to ignore error codes - which as you say is not a good approach.

      java is one of very FEW languages that has them

      I don't think anything apart from Java supports them - which is probably an indicator of their general utility ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://346738]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found