News for hackers. Stuff that matters.
Re:Why Perl Didn't Win by EdwardDiego on Monday June 09, 2014 @12:30AM (#7867035)
Your reply makes no sense to me I'm afraid.

> And I didn't realize the well written Perl code compiles equally better.

Equally better?

> And its certainly a lot easier to open files and do things in Perl than writing several hundreds of lines just to set and get variables for one single class.

Come on, seriously. Here's how I open files in Java:

    import com.google.common.io.Files;

    List<String> lines = Files.readLines(new File("/foo"), Charset.UTF8);
Why do you insist on straw-men to back up your arguments?
Re:Why Perl Didn't Win by Roboprog on Monday June 09, 2014 @12:50AM (#7867078)
On the one hand, that's a pretty cool library. (with a function to emulate back-tick into an array)

On the other hand, now I have to go to the Enterprise Committee with a Permission To Install Library Form to get it, since it's not part of the base language. It might well be worth it to use Google's jar, but it's a delaying nuisance.

Re:Why Perl Didn't Win by rat87 on Monday June 09, 2014 @04:11AM (#7867449)
java 8 has

http://docs.oracle.com/javase/8/docs/api/java/nio/file/Files...

Stream<string> Files.lines("/foo", StandardCharsets.UTF_8)

java 7 has http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files... but it's not lazy.

Re:Why Perl Didn't Win by EdwardDiego on Monday June 09, 2014 @01:06AM (#7867126)
> On the other hand, now I have to go to the Enterprise Committee with a Permission To Install Library Form to get it, since it's not part of the base language. It might well be worth it to use Google's jar, but it's a delaying nuisance.

Argh, same straw-man again mate.

Re:Why Perl Didn't Win by Roboprog on Monday June 09, 2014 @10:18AM (#7868553)
Dude, this ain't no straw man, this is my life! :-)

("only the names have been changed, to protect the guilty")

Not sayin' it's a universal problem, but it's a problem for me.

[deleted]
Re:Why Perl Didn't Win by Poiesis on Monday June 09, 2014 @01:13AM (#7867149)
So, I actually have no love for Java, and am greatly enjoying the higher proportion of scripting irb been up to lately. But I had to comment on a couple things:

> Why only that library...? I've seen it all when a Perl developer is calling out a Java developer regarding TMTOWTDI. Nice library though.

>I would like to execute some shell commands Not sure comparing to a language with an explicit complicit compilation step is fair.

Re:Why Perl Didn't Win by Roboprog on Tuesday June 10, 2014 @10:08AM (#7872525)
FWIW, I do more Java than Perl at work, though a fair amount of both. I guess I have written both "in anger", depending on the situation.

I guess the thing that gets under my skin about Java is that it is the mandatory one true language at so many workplaces.

Re:Why Perl Didn't Win by EdwardDiego on Monday June 09, 2014 @01:13AM (#7867148)
1) It's a library, there's no need for One True Library. Especially not in a Perl thread (CPAN is awesome). You use whatever works best for you. 2) Caught and re-thrown as a RuntimeException by the library. 3) No idea, but if I need that low level of control, I wouldn't be using a readLines convenience method. 4) Like you can pass files as a parameter, and create lists of them to iterate over.

5 - 8 are a different problem domain. But I was merely answering your hundreds of lines to read a file straw-man. I never suggested Java be used as a scripting language, if you really want to script on the JVM, use Scala, Groovy, Clojure or Kotlin.

But personally, I script in Python. Let's resurrect that old pissing match with Perl. ;)