News for hackers. Stuff that matters.
Re:Java 12 by vbezhenar on Tuesday March 19, 2019 @06:05PM (#19436541)
So far I did not find anything comparable to replace Java for website server language. Go is a terrible extremely verbose language without vital features. JavaScript on Node is limited by single-thread and JavaScript itself is a terrible language (along with other dynamic languages like PHP, Python, Perl, Ruby). Rust is awesome, but I don't think that it'll be ever usable for mediocre developers, therefore it can't be a safe choice for ordinary project.

The only reasonable alternative is C#. But it has to go a long way to reach Java's level of stability and trust on non-Windows servers.

Re:Java 12 by em-bee on Wednesday March 20, 2019 @10:11AM (#19442333)
LASR 14 hours ago [dead] [-]

> JavaScript itself is a terrible language (along with other dynamic languages like PHP, Python, Perl, Ruby)

You know, I used to think that languages had a single axis of Good. And each language sat at a certain point in that one dimension.

After several years each of experience writing large web applications using C++, Java, C#, JS, Python, Ruby and Go, that mental model of languages being good, bad or terrible seems incredibly naive now.

But overall, if someone were to ask me to write a web app today, I would probably use Python server-side and break it down into microservices. Client-side, probably just pure js + HTML5 APIs.

Why? Because I don't have the time to argue about languages being better or worse. I am too busy writing code that does useful things.

In a high-skill rockstar team, dev time is by far the most expensive resource. In a startup environment, using your dev time wisely is the difference between a unicorn and a failed business. Nobody gives a fuck if your route handler executes in 1ms or 20ms. I'll gladly pay the 20x hosting costs if that will get my feature out to customers a week earlier.

i don't know why this comment was downvoted so much. i fully agree with every point that LASR makes. if you disagree, i'd like to see your counterpoints please.

Re:Java 12 by nileshk on Tuesday March 19, 2019 @08:37PM (#19437713)
Assuming you meant specifically the Java language, Kotlin for JVM may also be a good option. Solid set of language features that puts it at least on par with C#, and allows you to write more DRY code than you can with Java language. As with any JVM language, you get all the benefits of the JVM. IDE support is great (at least with IntelliJ IDEA). It's an officially supported Android development language, putting it further into the mainstream. Also, as with other non-Java JVM languages, releases are not tied to JVM releases (I still use Java 8 for my Kotlin projects, while using the latest Kotlin version).

For browser or Node.js, TypeScript is the way to go IMHO. Node.js and it's ecosystem have it's issues, but TypeScript is quite nice and a considerable improvement over JavaScript, while being close enough to JS where it fits nicely into the ecosystem. Only downside is that it adds a compile step that can potentially grow to be time-consuming.

Re:Java 12 by vbezhenar on Wednesday March 20, 2019 @05:44AM (#19440444)
Yeah, I mean all Java ecosystem and I, personally, prefer Kotlin too.
Re:Java 12 by jillesvangurp on Wednesday March 20, 2019 @07:11AM (#19440900)
Kotlin is a drop in replacement for Java these days. I've switched a few projects now and mix Java and Kotlin during the transition. IMHO Kotlin is a breath of fresh air if you are coming from either Javascript or Java. Typescript is close but it is still javascript and it has a few inherent limitations because of that. Kotlin-js is basically a dropin replacement for that as well.
Re:Java 12 by hactually on Tuesday March 19, 2019 @07:40PM (#19437341)
Bit of a Go fan here so just wondered if you'd qualify what you mean by: > without vital features
Re:Java 12 by lenkite on Wednesday March 20, 2019 @01:49AM (#19439389)
Beating a dead horse here - but Streams and Generics are now what I personally consider vital features. Code is much more compact and elegant with the proper application of these two features.
Re:Java 12 by vbezhenar on Wednesday March 20, 2019 @05:47AM (#19440456)
Error handling via exceptions and generics are things that I can't live without. Go moves in that direction, as far as I understand, generics are expected in the next versions of Go and error handling somewhat improved, so may be it'll be good enough after few years, but I just can't write current Go after Java, it's like running with chained legs.
Re:Java 12 by apta on Friday March 22, 2019 @01:42AM (#19459902)
Other than what the other posters mentioned, you have things like annotations in Java that allow for cool features such as validation and constraints, and auto translation between types. This is extremely verbose and error prone in golang because no such mechanism exists.
Re:Java 12 by ilovecaching on Tuesday March 19, 2019 @07:52PM (#19437437)
Vital features is double speak for any Java feature that isn’t in Go.