Hacker News new | ask | show | jobs
by vicaya 5470 days ago
> entries = new ArrayList<Integer>() {{ add(3); add(4); }}

Nah, entries = Arrays.asList(3, 4);

Scala is pretty sweet with a lot of syntactic sugars, but it still it doesn't fundamentally make writing correct code any faster, especially for Java developers who are competent with their IDEs. Until Scala's compile time and IDE support improves 10x, I see no point of using Scala for production code.

Slightly more verbose Java syntax is more than made up by the instant/incremental compilation/autocompletion/refactor that works. Even as a Java noob (I'm more experienced in C++), I can bang out correct code the first time without going through any edit/compile cycles, most of the time. IDE is the new REPL and language snobs always forget that.

1 comments

I feel that the boilerplate code IDEs spit out on demand is far more of a liability than not. Once it's created it's your responsibility to maintain.

By focusing on the creation of the simplistic code we ignore the burden of maintaining ten lines of critical fluff for every intentional line of code.