Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Meh, I've done typescript node.js and java play framework projects interchangeably for the past two years and honestly there isn't much of a difference when it comes to velocity or code verbosity.

I think many people have a misconception of what modern java is. They still think java code is all this verbose monstrosity where every single thing requires massive amounts of boilerplate code. And yes, at one time it was that thing. But modern java isn't like that at all, with streams, collections, optionals and closures getting rid of much of the boilerplate.

For example, this is the entire body of the REST endpoint that fetches a drawing for a particular location in my current codebase. It wouldn't be any simpler had it been written in typescript.

  return Drawing.getForLocation(id)
      .map(d -> ok(Json.toJson(d)))
      .orElse(notFound());


I agree. I work with Java at my $dayjob, and I must say that the introduction of Java 8, as well as JavaFX becoming a de-facto standard Java UI toolkit, made this language much saner to work with for building anything GUI-based. It's no Common Lisp, but coupled with a decent IDE Java today isn't significantly less productive compared to other mainstream languages.


You forgot to declare the package (i.e. the file path), and the class name (i.e. the file name), and the class definition so that the Verb you posted is chaperoned by a Noun.


Well, you'd have those things in any language. A route definition, some kind of namespace, a controller object implementing a method for the route, the last bit being what I posted code for. My point is: Java doesn't need to be worse than other languages in any of those things anymore.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: