Re:Is Scala really more complicated than Java?
by cousin_it on Friday September 18, 2009 @04:27PM
(#831126)
I know that's totally beside the point, but I'd have coded the example like this:
[ Parent
| on HN ]
Re:Is Scala really more complicated than Java?
by swannodette on Saturday September 19, 2009 @01:38AM
(#831695)
Your solution is:
print"""Happy Birthday To You\nHappy Birthday To You\nHappy Birthday Dear XXX\nHappy Birthday To You""" -> 103 chars
This came up on the Clojure mailing list:
(dotimes[x 4](println"Happy Birthday"({2"Dear XXX"}x"To You"))) -> 63 chars
40 less characters.