News for hackers. Stuff that matters.
Re:Why Python is more fun that Java by axod on Saturday August 16, 2008 @08:29PM (#278085)
Sorry but I stopped reading here...

System.exit(0);

It's hardly going to be fair and balanced with things like that in it.

Re:Why Python is more fun that Java by paul on Sunday August 17, 2008 @02:41AM (#278229)
His StringBuffer example is also wrong (the java compiler would automatically use a StringBuffer in his example).
Re:Why Python is more fun that Java by chrisbroadfoot on Sunday August 17, 2008 @01:49PM (#278468)
StringBuilder?
Re:Why Python is more fun that Java by paul on Sunday August 17, 2008 @03:45PM (#278547)
Oh yeah, that's right, since jdk1.5. It used to be StringBuffer.
Re:Why Python is more fun that Java by chrisbroadfoot on Saturday August 16, 2008 @09:11PM (#278099)
TRWTF is this:

  for (String s : args[0].split("\\s+"))
      System.out.println(s);
which is exactly the same as:

  System.out.println(args[0]);
(redacted)
Re:Why Python is more fun that Java by jdale27 on Saturday August 16, 2008 @09:38PM (#278111)

  [jdale@localhost ~]$ java -cp . Test "foo bar baz"
  foo
  bar
  baz
Re:Why Python is more fun that Java by chrisbroadfoot on Saturday August 16, 2008 @09:55PM (#278117)
Oh, good point. Cheers.

I then submit my Groovy solution:

  args[0].split().each { println it }