|Pathologically Eclectic Rubbish Lister|
(Guildenstern) Re: "Obviously, You Will Need a Java Course..."by Guildenstern (Deacon)
|on Apr 03, 2001 at 22:43 UTC||Need Help??|
Personally, I don't have much of a problem with Java. We're using it to develop our Web applications, and it works fine for that. It all boils down to using the right language for the job. Granted, Perl is great, but it's not a be all, end all solution. I'm not saying that Java is that solution either, but there are some cases where (IMHO) it's easier to get things done. Take, for example, session handling. In a Java Servlet, I just need to say something like
if I want to add something to a persistent session. In Perl, this can be done (see Apache::Session), but it doesn't have the same flow to me. Sure, somebody can write a Perl session handler that works like its Java counterpart, but that's not the point I'm trying to make here. I'm saying that in this case, Java works better for me.
As far as the examples that you provide, System.out.println("Hello"); should be familiar to anyone who's had exposure to Object Oriented Programming. Since you said you're new to programming in general, I can understand your confusion.
The second example illustrates a very simple example of Java's error handling. Instead of die-ing, catching the error can let you do other things like retrying the open or notifying another process. I'm not sure if Perl supports error handling in the same manner (try and catch, or similar), but I'm sure somebody here can clue me in.
Negaterd character class uber alles!