in reply to Perl "with" Java

I am going through similar stresses at the moment, and to reiterate moritz's advice, Java and Perl really don't bear much similarity, and aren't really learned in the same way. However, I do really think it is worth while, because I feel ( and this is just, like, my opinion man, and i am sure a lot of differing opinions exist... ) that Perl and Java, in combination, give you the skills to approach a huge diversity of problems.

Perl, for me, has the benefit of short development time, a great support community and a vast library of public code. Which makes it superb for getting things done.

However for larger applications, especially graphical ones, Java comes into it's own. Being fully OO, and with strict typing, development (in terms of bug-fixing especially) and leaving a lasting legacy (rather than a maintainers nightmare) becomes much more feasible, at the cost of being much more wordy and all the other usual complaints. Also, because people tend to rely most heavily on the core libraries, it is a little bit easier to make applications that work 'out of the box'.

I am still getting the hang of Java, and my knowledge is much worse than for Perl (which even then isn't anything to boast about!), but one lesson i have learned already is better project management. Java makes you think and plan in advance a lot more, which has certainly imporved my coding in Perl, and it has helped me understand OO concepts better ( like abstraction and encapsulation ) which again has improved my Perl.

Also in general, I find myself thinking which language would best suit the project, whether this is something i just need to get done, or something which i will build on for years to come and make into a huge 1000's of lines project.

Big projects seemed to me to be Perl's weakness, which was why i looked into Java ( and to improve *job* options... ) and i think the two complement each other well, as opposed to Python / Ruby etc... which seem to also be very popular, but in my mind stand a bit in the middle ground and are neither as good at the swiss-army-chainsaw stuff as Perl, or as good as Java for bigger applications. I hear very good things about Ruby though, especially the Rails stuff, but i am not really a web-person, so i haven't put too much time into it.

Anyway, I guess my point is that Java and Perl are very different, but that is a good thing. As moritz said, you shouldn't try to combine the two, but really try to understand their respective strengths and weaknesses and apply them to each problem in the best way.

Just a something something...

Replies are listed 'Best First'.
Re^2: Perl "with" Java
by suaveant (Parson) on Nov 23, 2009 at 15:48 UTC
    My take on large projects in Perl is that they can be done well and elegantly, but often aren't. I think part of the problem is just how fast you can develop in Perl, a lot of things start out small and grow big. People don't always take the time to fix the old code up to prepare it to move to the big time, and you end up with something more organic than structured. Perl can make great large systems with proper attention spent. :) Java being more rigid forces that mindset more, but takes forever to work with compared to Perl (and has the ugliest errors in the world)

                    - Ant
                    - Some of my best work - (1 2 3)

      I agree - i guess that was the point i was trying to make! I didn't mean to say that big projects are *never* any good in Perl, just that Java makes it a lot easier for you. I think your point about the speed of Perl development almost being the problem in this case is a very good one!

      Just a something something...
        I don't know as I'd ever go so far as to say Java made anything "easy" ;)

                        - Ant
                        - Some of my best work - (1 2 3)