Re:When being idiomatic wears you out
by noelwelsh on Saturday August 27, 2011 @09:29AM
(#2931415)
Since the crux of the argument seems be that Java is too verbose, I wonder why he doesn't look at other JVM languages? For example, in Scala you'd write List(foo) for a singleton list. In Clojure the equivalent is '(,foo). Both languages have a decent size community and ongoing development.
[ Parent
| on HN ]
I also reacted that the author mixed in Python in his Java-project when Scala is a really fine alternative.
Using Scala and Java he can write very short and readable code and use Java only when there's a performance concern or a similar reason.
People say Scala is complex and academic, but if you don't try to write your first Scala programs using every feature of the language you'll see it's a useful and likable language.
Use it a bit like you'd use C++, pick a feature-set you understand and like and be consequent with your use of parens/lack of parens.
Re:When being idiomatic wears you out
by groovy2shoes on Sunday August 28, 2011 @01:40AM
(#2933394)
Close, but in Clojure you'd actually write:
`(~foo)
or:
(list foo)