Live data from Hacker News

Why we choose Java instead of a polyglot stack

product.hubspot.com

31–40 of 155 posts

Re: Why we choose Java instead of a polyglot stack

#31
post #4

I also advocate for Java, but mostly because I invested in companies that manufacture RAM.

in the Ruby world people end up consuming more RAM when using the C based ruby (MRI) because in order to achieve concurrency they must scale with processes and that consumes an absorbent amount of RAM. With JRuby you can scale concurrency with native threads that have minimal memory overhead.

Re: Why we choose Java instead of a polyglot stack

#32

If you're not picking the JVM in 2016 to build your core services and web applications then you're making a mistake that is going to cost you time and money either upfront in building things that already exist or later down the road when you start to need more performance and your RoR application isn't cutting it anymore. Say what you will about Java the language (I agree it's not particularly "sexy") but the JVM is…

I'm really not a fan of these kinds of blanket statements where you lump everything into "JVM" or "failure". The JVM is a good platform for performance, stability, etc. but it's not the only one. The .NET ecosystem is pretty high up there for performance (and gives you a bit more room for fine tuning) and it easily has some of the best support in the industry (both 1st and 3rd party). And we've all seen success stories with Node.JS, RoR, and all sorts of niche languages that probably wouldn't have happened with a different language (because of factors like needing to get up quick prototypes for startups or just the culture at those specific companies). There's no road that will "set you up for failure," so to speak. In reality, it comes down to what works for your team and your application, and a lot of times there's no clear-cut winner in those cases.

Re: Why we choose Java instead of a polyglot stack

#33
When you try to use Java you will need new, young programmers.

Experienced Java programmers will most often be indoctrinated/trained/used to over-engineering and wrapping everything in layers upon layers of abstractions. And the existing Java learning books, tutorials and examples still tend to follow that mindset.

The more abstracted your code is, the slower it will run, the more memory it will consume and most especially the more difficult it will be to get a new developer up to speed.

Re: Why we choose Java instead of a polyglot stack

#34

If you're not picking the JVM in 2016 to build your core services and web applications then you're making a mistake that is going to cost you time and money either upfront in building things that already exist or later down the road when you start to need more performance and your RoR application isn't cutting it anymore. Say what you will about Java the language (I agree it's not particularly "sexy") but the JVM is…

Does Kotlin offer anything Rails like with batteries included? I'm steering away from Ruby. I love Rails but ruby becomes a monster when a project gets larger. I've looked at TypeScript and Express.js but I'm worried I gotta deal with type definitions a lot.

Re: Why we choose Java instead of a polyglot stack

#35
post #19

I agree that Java is the best programming language to write web services in right now. But I have to admit that the most threatening counter-argument to using Java in 2016 is that Scala is, to all appearances, a strictly better language. It's similar to Java and does everything Java does, but better- it has type inference, it does away with primitive types and arrays, it has compiler-checked string interpolation, it…

On the contrary Scala is baroque, its syntax is not following any known pattern. For example if I want to write a recursive function I have to indicate my return parameter type otherwise not. It doesn't matter whether you come from a C background or a Java background...or any background because of this: > def addInt( a:Int, b:Int ) : Int = { > var sum:Int = 0 > sum = a + b > return sum > } You have to relearn how a f…

There are a lot of reasons to hate on Scala and the order of definitions of types in the functions is not a huge one.

Re: Why we choose Java instead of a polyglot stack

#37
post #19

I agree that Java is the best programming language to write web services in right now. But I have to admit that the most threatening counter-argument to using Java in 2016 is that Scala is, to all appearances, a strictly better language. It's similar to Java and does everything Java does, but better- it has type inference, it does away with primitive types and arrays, it has compiler-checked string interpolation, it…

On the contrary Scala is baroque, its syntax is not following any known pattern. For example if I want to write a recursive function I have to indicate my return parameter type otherwise not. It doesn't matter whether you come from a C background or a Java background...or any background because of this: > def addInt( a:Int, b:Int ) : Int = { > var sum:Int = 0 > sum = a + b > return sum > } You have to relearn how a f…

> You have to relearn how a function looks like in the first place. Return types are at the end, parameter types are after the parameter name separated by a colon.

baroque syntax?

Like these:

- https://swift.org/getting-started - https://doc.rust-lang.org/book/functions.html - https://golang.org/doc/effective_go.html#functions - https://kotlinlang.org/docs/reference/functions.html

Sorry but you pretty much say clojure is the best, however it has a lisp syntax, which IS baroque and most people aren't use to this. These days if you want to have a functional style. You eiter use Scala or Kotlin. Clojure is too much of a unicorn. People won't learn this. Also people doesn't care how good the language is or what design patterns were used. People use these languages cause they think the language has a actual value for them (as you think about clojure)

Re: Why we choose Java instead of a polyglot stack

#38
post #29
post #16

Earlier quoted context omitted.

Java is great but there are other high-performance options with great languages e.g. Haskell.

I'm skeptical that any other language will be nearly as easy write, operate, and maintain in production as Java. It's really easy to administrate Java applications. You can connect to the JVM and examine what objects are in the heap, or request a thread dump and see what threads the application has launched and what they're doing. There are rarely any (JVM-level) correctness issues since code is safe and has a simple…

I don't really know how most of these relate to Haskell specifically. For example, you bring up safety and the exception model used in Java, but Haskell puts an even higher priority on safety/correctness than Java does. IDE support may be weaker, but IDEs tend to solve problems very specific to the languages they target, namely Java in this case. Refactoring is seen as much less of a problem, for example, since the lack of side effects lets you move any function to wherever you want in your code without breaking anything and the type system/compiler guide you through the entire process if you mess something up. And besides, pretty much every popular editor or IDE has a Haskell plugin that is easily as good as most of the Java tooling out there.

Re: Why we choose Java instead of a polyglot stack

#39

When you try to use Java you will need new, young programmers. Experienced Java programmers will most often be indoctrinated/trained/used to over-engineering and wrapping everything in layers upon layers of abstractions. And the existing Java learning books, tutorials and examples still tend to follow that mindset. The more abstracted your code is, the slower it will run, the more memory it will consume and most espe…

This sounds like unjustified FUD. It's not been my experience. A large amount of infrastructure at companies like Google, Amazon, Facebook, Ebay, etc. is written in Java and the code I've seen from those companies is well-engineered. Google Guava stands out as an example of extremely strong style. Apache Hive and Avro (from Facebook) are also clear and not overly complex.

I believe you that there are ineffective programmers of any language who over engineer, but I haven't seen that from personal experience with Java programmers. To the extent that it's a problem, it sounds like a hiring problem rather than a Java problem.

Re: Why we choose Java instead of a polyglot stack

#40

When you try to use Java you will need new, young programmers. Experienced Java programmers will most often be indoctrinated/trained/used to over-engineering and wrapping everything in layers upon layers of abstractions. And the existing Java learning books, tutorials and examples still tend to follow that mindset. The more abstracted your code is, the slower it will run, the more memory it will consume and most espe…

Sorry but I don't feel that way. I've been using Java since 2008 and have worked with other engineers. Nobody would want to write more code than it has to be.

I also don't see tutorials or books that create too many layers for a while (especially post EJB2/EJB3.0 days).

Post reply on HN