Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | 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. One of the driving design issues behind our site development is to make eveything server-side to the point of excluding client side scripting (JavaScript, VBScript,etc). This means that we must perform all of the input validation in the Java Servlets and Java Server Pages. This is a case where Perl is by far the superior language. It's so much easier to run a string through a regex than to use Java's String methods. (Of course, somebody has written a regex package for Java, but once again that's not the point I'm making.) 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. Guildenstern Negaterd character class uber alles! In reply to (Guildenstern) Re: "Obviously, You Will Need a Java Course..."
by Guildenstern
|
|