MJD's Higher Order Perl is a fantastic resource for "new" techniques as applied to Perl. And, I've read the latest edition of the Camel book and found that I never really understood the language when I was using it three or four years ago (at the time I had read Learning Perl, and Perl in a Nutshell). Perl is so much more powerful, concise, and pretty, than I'd realized.
Perl 5.10 and 6 are really quite nice, as well. Objects are still somewhat quirky in 5.10, but will be fixed beautifully in 6. Likewise for named function arguments. Field Hashes are neat.
Oh, and using JSON with Perl is lovely--since everything we do is passing around references to arrays and hashes and such, converting a traditional HTML UI to an advanced JavaScript one is so much easier than I expected (and because objects are hashes, it'd be possible to do something similar, even if our code were more object oriented). Really quite smooth. JSON::XS is super fast and easy to use.
public class hello {
public static void main(String args[]) {
System.out.println("Hello World");
}
}
Also, I interviewed with a large company that shall remain nameless (probably not who you would expect), and one of the interviewers mentioned that their build system was a MILLION lines of Perl...A million lines of Perl, was maintaining that part of the job description?
And in Python, print "hello, world" is bad form. It would be proper to write (news.YC is omitting some newlines below)
def main(): print "hello, world"
if __name__ == "__main__": main()
I think the reason the LOC count is significant is because it means that there is less code for one to look through to figure out what is going on. Fewer lines imply that the solution has high level abstractions. Each one of the examples you mentioned is one construct in lisp (if you use libraries).
More abstractions can be nice, but don't mistake it for less code. Its still code somewhere, and that can lead to much more subtle and hard to find problems if you don't understand exactly what's going on. Of course, some environments are bigger culprits than others, but its something to keep in mind.
The reason you can get by with a shorter hello world program in most dynamic languages is because you're doing it in the "module" definition, which I think is not proper form in any non trivial programs. So any differences in LOC for hello world really mean nothing over the course of a real application.
I actually like the way regular expressions are being handled in Java. The only problem is that "\" has to be escaped in Java Strings, so the regex patterns tend to have a lot of slashes.
Screen scraping. I don't have any major problems with Java--it's just that it lends itself to serious over-engineering. Maybe that has more to do with business culture.