News for hackers. Stuff that matters.
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.

Re:Is Scala really more complicated than Java? by cema on Saturday September 19, 2009 @02:23AM (#831725)
A nice trick! And can be derived directly from the "definition" of the song (that is, from the way the song is constructed). Great!