Hacker News new | ask | show | jobs
by proxyon 1088 days ago
Typescript. Kotlin. Java.

I cannot imagine going back to Python, Ruby or PHP after using modern languages like these.

Also, Java performance is good enough. Why did anyone ever abandon Java? It's easy to read, easy to write and pleasant enough to work with. If you need C level performance, by all means go with C, Go, Rust but Java to me is perfect, and Typescript is good enough for everything else.

4 comments

People dislike Java because of all the...

  public void setPints (int pints) {
    this.pints = pints;
  }

  public int getPints () {
    return pints;
  }
...-esque stuff, and similar overly verbose constructs you get when you follow certain Best Practice guides.

Personally I kinda like Java, despite it having 4 different kinds of brackets and object.method() syntax. Maybe it's the combination of 1 file 1 class and using classes for everything.

Use Kotlin.
...because Kotlin doesn't use different kinds of brackets and object.method() syntax?

Regardless, I'll stick to Common Lisp and C for the time being, they're nice.

No, it has that.

It doesn't have the -esque syntax and similar overly verbose constructs.

> Why did anyone ever abandon Java?

Because I physically recoil when 80% of the code is "APIAccessConfigurator apiAccessConfigurator = new APIAccessConfigurator(apiAccessConfiguratorToken, new apiAccessConfigurationParameters().class)" and similar crap.

In part, because the Java ecosystem kept getting more complicated. Fifteen or so years ago I was a full-time Java developer, but I wouldn't know half of what I need to know today, and I'm not very interested in going that route. Java kept the language simple-ish (not really, because they have added a lot on top of it), but the stack grew rapidly, and you have to know the tooling to function in that environment.

Python remains a lot simpler. It is getting more complex, but it has miles to go before it reaches Java-land.

> Why did anyone ever abandon Java Boilerplate code.

Java applications (mostly picking on tomcat here) being pretty much their own world of configuration, with lots of different places to look.

Slow startup time pretty much kills it for lots of things I'd wanna write.

It's memory management stuff sucks, from a sysadmins perspective. Any java application I deploy takes easily multiple times more memory than anything similar in a non-JVM language.

I've seen some slim running JVM stuff by developers who actually bothered to care about it - under 25Mb slim.

Yes, lots of Java apps basically go "lol .... KABOOM" if you give them less than half a gig of RAM to play around in, but IMO that's a tragedy of the commons like thing within the ecosystem where common approaches mean you end up with layer upon layer of libraries none of which thought -their- RAM use was particularly egregious.

At this point, it's not the runtime's fault (G1 is excellent), and while you could argue that the language design led developers to do things wrong I think it's more a culture phenomenom - I think I might consider blaming J2EE and its proponents rather than the language itself.

Of course, from a sysadmin point of view, the runtime+application combination's memory usage is what matters in practice, I'm just saying the reason why you find yourself staring at the screen thinking "wait, it's using how much?!" is more complicated than "Java's memory management stuff sucks"