The funny thing is that from a purely technological point of view, Java (even the 5-year-old Java 8 and certainly recent versions) is far ahead of most other stuff hyped on HN (as well as less hyped stuff). Virtually no other platform comes close to that combination of state-of-the-art optimizing compilers, state-of-the-art GCs, and low-overhead in-production profiling/monitoring/management. And much of the cutting-e…
The funny thing is that from a purely technological point of view, Java (even the 5-year-old Java 8 and certainly recent versions) is far ahead of most other stuff hyped on HN (as well as less hyped stuff). The technology is certainly impressive but it isn't equipped to deal with the modern world. It is trivial to run 10 Node.js applications in the memory of one JVM application. This never used to be a problem, but n…
IT Runs on Java 8
251–260 of 556 posts
Re: IT Runs on Java 8
#252Earlier quoted context omitted.
There's very little reason not to upgrade to Java 8. Generally things just work. With Java 11 generally things just break, so it's completely another matter. I think that Java 8/11 will repeat Python 2/3 story.
We are moving to Java 8. There is a special place in my heart to hate the new shiny lambdas. Makes code too difficult for reading, nowhere compatible when needing to use Java 7 every now and then. With the article would just disagree on Sharepoint, would say Confluence has finally replaced that one.
Quick, what does this do (in Scala)?
(1 to 100).map(x => x * x).reduce(_ + _) ?
Or if you don't like the underscores we could make it more explicit:
(1 to 100).map(x => x * x).reduce {case (x, y) => x + y }
Let's look at the iterative alternative:
var (i, sum) = (0, 0)
while (i You could argue about performance or whatever, but closures are safer, more powerful, easier to read, and more concise.
Using a language without anonymous closures is like programming blind-folded and with one hand behind your back. It's pretty much the definition of Paul Graham's "Blub" languages[1]
Of course, classes are closures and closures are classes. But classes without closures are verbose, stupid, and ugly.
Re: IT Runs on Java 8
#253The funny thing is that from a purely technological point of view, Java (even the 5-year-old Java 8 and certainly recent versions) is far ahead of most other stuff hyped on HN (as well as less hyped stuff). Virtually no other platform comes close to that combination of state-of-the-art optimizing compilers, state-of-the-art GCs, and low-overhead in-production profiling/monitoring/management. And much of the cutting-e…
For such an advanced JVM, having to prewarm it by calling code 5000x times or the JVM being much more memory hungry than other non-JVM languages doesn't feel like the cutting edge.
If you're running microbenchmarks and having issues, then you're likely not using JMH, the Java Microbenchmark Harness which used to be a 3rd party library but is now built in to Java 12.
Is Java memory hungry? Maybe. If you're just writing a small routing server, probably not the right use case for Java. If you're writing a big and complicated game server with hundreds of routes and you need to talk to MySQL, Redis, and Memcache then I'd say the memory overhead of Java is really quite good. Don't forget that you can tune the min/max heap and other things like that, especially with the module system in Java 11. However if very low memory is a requirement, then you're probably running in an embedded environment and you probably shouldn't be using Java.
Re: IT Runs on Java 8
#254Earlier quoted context omitted.
How are Java programmers implementing RESTFUL APIs these days?
You should checkout new RedHat framework - [Quarkus]( https://quarkus.io/ ). This is a framework which leverages Graal to create native images. Those images are very small and optimized. For example one of Quarkus developers showcase the size of native image, spoilers - it's [19MB]( https://youtu.be/BcPLbhC9KAA?t=103 ). It takes 0,004s to start. In [this]( https://youtu.be/7G_r1iyrn2c?t=3104 ) session, RedHat develop…
Re: IT Runs on Java 8
#255Earlier quoted context omitted.
The funny thing is that from a purely technological point of view, Java (even the 5-year-old Java 8 and certainly recent versions) is far ahead of most other stuff hyped on HN (as well as less hyped stuff). The technology is certainly impressive but it isn't equipped to deal with the modern world. It is trivial to run 10 Node.js applications in the memory of one JVM application. This never used to be a problem, but n…
What's wrong with Oracle's stewardship? I am not a fan of Oracle, far from it, but Oracle's stewardship of Java has been exemplary.
- The licence changes causing a premature move to Java 11 or OpenJDK out of fear of an audit. Today a colleague was investigating a Segmentation fault in the JVM because we moved to the OpenJDK. This is not productive work.
- The future of j2ee is uncertain: https://headcrashing.wordpress.com/2019/05/03/negotiations-f...
How did you get to "exemplary"? Have you got any examples?
Re: IT Runs on Java 8
#256Earlier quoted context omitted.
Many developers don't want to think too much and generally choose Spring boot for a stable, highly-popular and well-documented framework. There is nothing wrong with this choice but I find it too bloated for lean container based micro-services. Dropwizard and Micronaut are pretty good for getting a smaller and saner footprint. If you need more than REST, say you want a lean MVC-based web-framework, then Blade is also…
I'm curious to hear what specifically is too bloated in Spring Boot in your opinion for container based microservices. I've been writing microservices that run in docker in Java for a few years, then moved to Kotlin recently, all using Spring Boot, and I haven't run into anything that made me feel like they were bloated. I've also written Go and Node microservices for contrast.
Re: IT Runs on Java 8
#257Earlier quoted context omitted.
No, you don't need to reverse your opinion at all. Personally, I voted you down because your opinion was stated in a sort of offhanded manner that does not do the subject justice.
The manner is neutral. It's only a couple words. You want me to write a whole essay on the pros and cons of legacy? In that case I would invite a negative vote because in those cases you can disagree. In this case it's just a statement that is true.
It's mostly a derisive term that seems to mean: "Old technology I don't like."
Re: IT Runs on Java 8
#258Earlier quoted context omitted.
This. Technically there is nothing I don't like about JVM right now, everything that seems impossible 15 years ago is now solved. AOT used to be bag of hurt with GCJ ( I know I could use Excelsior, not sure if it was free in my time though ), but now even that will be an supported option from Graal. Java the languages still isn't pretty, but it has been much improved. OpenJDK is GPL and apart form the trademark ( ? )…
> Technically there is nothing I don't like about JVM right now, everything that seems impossible 15 years ago is now solved. Value types are a major missing piece in the JVM stack right now. It's at least on the roadmap, but it keeps getting pushed back and back and back. I'd also argue runtime generics is another one, and perhaps more depressingly one that is unlikely to ever get fixed. .NET has both of them and al…
Yes, yes. I know that Microsoft theoretically open sourced and ported it. However the way that this always works is that there is a base that can be written in, but anything non-trivial will have pulled in something that, surprise surprise, is Windows only.
Otherwise I agree that it is a better Java.
Re: IT Runs on Java 8
#259Earlier quoted context omitted.
We are moving to Java 8. There is a special place in my heart to hate the new shiny lambdas. Makes code too difficult for reading, nowhere compatible when needing to use Java 7 every now and then. With the article would just disagree on Sharepoint, would say Confluence has finally replaced that one.
Do you really prefer a language to not have higher order functions than with them? Quick, what does this do (in Scala)? (1 to 100).map(x => x * x).reduce(_ + _) ? Or if you don't like the underscores we could make it more explicit: (1 to 100).map(x => x * x).reduce {case (x, y) => x + y } Let's look at the iterative alternative: var (i, sum) = (0, 0) while (i You could argue about performance or whatever, but closure…
sum = (1 to 100).map(x => x * x).reduce {case (x, y) => x + y }
sum = 0
for i in 1..100 { sum += i * i }
I personally find the second one easier to understand. Performance is much better unless the compiler does some magic to convert the first version to the second one.Adding more logic to the loop also doesn't make the code more complex.
Re: IT Runs on Java 8
#260The funny thing is that from a purely technological point of view, Java (even the 5-year-old Java 8 and certainly recent versions) is far ahead of most other stuff hyped on HN (as well as less hyped stuff). Virtually no other platform comes close to that combination of state-of-the-art optimizing compilers, state-of-the-art GCs, and low-overhead in-production profiling/monitoring/management. And much of the cutting-e…
This. Technically there is nothing I don't like about JVM right now, everything that seems impossible 15 years ago is now solved. AOT used to be bag of hurt with GCJ ( I know I could use Excelsior, not sure if it was free in my time though ), but now even that will be an supported option from Graal. Java the languages still isn't pretty, but it has been much improved. OpenJDK is GPL and apart form the trademark ( ? )…
The hardest part that everyone struggled with was getting a Java environment up and running. Gradle, maven, ant... You almost need and IDE. Its almost like they don't want people using it. I stopped when I didn't have too.
Plus the acronyms. Ones I didn't know from your post:
AOT, GCJ, Excelsior, Graal, OpenJDK, JakartaEE