Live data from Hacker News

Love It or Hate It, Java Continues to Evolve

azul.com

141–150 of 156 posts

Re: Love It or Hate It, Java Continues to Evolve

#141

When I first went to college for my Associate's Degree, we learned C++ and had the option to choose between Java and Visual Basic. I chose Java, obviously, because who the hell wants to know Visual Basic? I really liked Java back then because C++ had always been a struggle, not because of pointers or anything like that... but because I always found project management, figuring out how to link libraries, and build my…

> and the lack of good options for deploying executable code

GraalVM is a way to resolve that: https://quarkus.io/, https://micronaut.io/

You might want to check out C# as well. .NET Core is coming along nicely, and you get to work in a safe environment, with the ability to drop down to pointers if needed, unlike the unsafety that is inherent to C++.

There is also a C# to C++ compiler that the Unity people wrote, worth checking out.

Re: Love It or Hate It, Java Continues to Evolve

#142

Earlier quoted context omitted.

it's not even magic, it's redundant over engineering at its peak haskell has magic, but at least its concise..

It's like playing Where's Waldo, to find the actual code in an enterprise Java/C# application. I think it's a fundamentally different mentality as far as the code. The codebase is so obfuscated that it might as well be binary data rather than plaintext files. You need an IDE to manipulate it efficiently.

I feel like Enterprise is all about looking complex to justify the fees. The simpler it looks the harder it is to bill.

http://jeffacubed.com/the-boilermaker-story-or-knowing-where...

Re: Love It or Hate It, Java Continues to Evolve

#143
post #66

"James Gosling, the Father of Java, described it as a Blue collar programming language." I wonder what can be considered a white collar programming language which is actually used a lot. Erlang? ES6 with ever changing front end frameworks?

Python or Ruby I'd say, Erlang's a little bit too unique I think for that analogy

Python/Ruby are even easier than Java and don't require much skill to master.

Re: Love It or Hate It, Java Continues to Evolve

#144
post #17

In my experience most people don't like Java due to experiences they had before Java 8. This means they were used to the bloat, config as XML style world which made Java a pain to write and slow to run. Once I show them Java 11 with var keyword, lambda's and streams they start appreciating how modern the language has become. Then you throw in frameworks like javalin or sparkjava and suddenly they are not as hostile a…

RE native runtime compilation: have you had a look at GraalVM's native image: https://www.graalvm.org/docs/reference-manual/aot-compilatio...

GraalVM works with Java 8, Java 11 isn't fully implemented

Re: Love It or Hate It, Java Continues to Evolve

#145
What kept me away from Java was mostly configuration rather than language itself. You had to manually place jars in some lib folder, have things like "classpaths" and lot of this shit was glued together using XML files.

But once gradle came into picture along with IntelliJ I totally moved to Java.

Re: Love It or Hate It, Java Continues to Evolve

#146

Earlier quoted context omitted.

I wonder how much salary increase it would take to make working with xml/spring worth someone's while. Meh.. in my opinion a lot of this is just tropes. Spring is a fine environment to work in, although you really don't have to use any XML with modern Spring. But you can if you prefer to for some reason. All the annotation driven "black magic" can be mildly annoying at times, especially before you understand what's g…

> old EJB 2.x era "J2EE" could have had worse you started just around the xdoclet, that was peak madness

Some of us worked at a shop that embraced Microsoft’s “embrace and extend” J++ with COM wrappers to go with Java. I still think THAT was peak insanity.

Re: Love It or Hate It, Java Continues to Evolve

#147
post #26

Earlier quoted context omitted.

Loom is rather nice, but frankly I don't find the lack of co-routines something I miss. You can spawn hundreds of real threads a second so it is possible to write Go style code in Java if you really want. I may change my mind when I actually use it though. I don't mind what type of data classes they come up with. I just want to not have to write stupidly long constructors, multiple sets or chain-able objects when I w…

I've definitely had to fix servers that have choked themselves with thread abuse, so maybe it's ptsd. The fixes can be as simple as shrinking threadpools to needing substantial rewrites, so I still treat threads as resources requiring management. Green threads are nice because they let me separate logical execution from operating system resources. Unlike Go, Java will expose the ability to use a custom scheduler, so…

You can already use custom schedulers with java.util.concurrent though.

Re: Love It or Hate It, Java Continues to Evolve

#148

Earlier quoted context omitted.

Not the guy that you were asking but Trivial example: public static void assertIsSuperset(Collection superSet, Collection actualSet) { final List missing; missing = actualSet.stream().filter(x -> !superSet.contains(x)).collect(Collectors.toList()); if (missing.size() != 0) { /* Imagine some more verbose exception creation here, which is why we caught it in a list*/ } } The lambda is in the creation of 'missing': filt…

That still seems very clunky and also very inefficient compared to what I'd do in Swift: func isSuperset (superSet: Set , actualSet: Set ) -> Bool { return actualSet.contains(where: { !superSet.contains($0) }) } What is all the noise about "collect"? Why allocate a while new list? What's with the "final"? And why do I have to type out obvious types in 2019?

Except that is a Pyrrhic victory, as Swift is quite useless outside Apple platforms.

Linux support is still WIP, Windows nowhere to be seen, and everything else is not supported at all.

Re: Love It or Hate It, Java Continues to Evolve

#149
post #17

In my experience most people don't like Java due to experiences they had before Java 8. This means they were used to the bloat, config as XML style world which made Java a pain to write and slow to run. Once I show them Java 11 with var keyword, lambda's and streams they start appreciating how modern the language has become. Then you throw in frameworks like javalin or sparkjava and suddenly they are not as hostile a…

Java 11 is obviously much better than Java 8, which is still leaps and bounds ahed of Java 6, itself an improvement over Java 4. You'd see the same in every language. Java's problem is that for many years it used to be the slowest car around. Maybe this was one of the things that helped Java become the undisputed ruler Enterprise Inc. but now it's got a lot to catch up with, and even though the pace has picked up sin…

The slowest car still gets you down to the city center.

And neither Java nor C# have anything to brag about Streams or LINQ.

I could already writen those code examples in Lisp, Scheme, Caml Light or Smalltalk.

What we have is mainstream computing catching up, or as Erik Meyer has stated, selling Haskell to VB programmers.

Re: Love It or Hate It, Java Continues to Evolve

#150
post #136

Earlier quoted context omitted.

did you ever try Kotlin ? whats your opinion there ?

I have not. The only major thing I see in Kotlin over Java right now (I don't do Android development) is data classes. Everything else is either in the language or should be soon which makes me hesitant to invest the time learning it.

I agree with you here, I think that Kotlin is settled for life in what concerns Android, given the sore state of Android J++ and #KotlinFirst announced at IO.

Outside Android, we can enjoy modern Java, which makes Kotlin just yet another language capable of targeting the JVM.

Post reply on HN