In other news, we have an upgrade path at work to go from Java 8 to Java 11 pretty soon.
do/i/still/need/to/create/sub/directories/for/the/things/i/want/namespace?
Java 21 makes me like Java again
361–370 of 777 posts
Re: Java 21 makes me like Java again
#362Earlier quoted context omitted.
C# does not have virtual threads. What C# has is async/await. Which was nice for its time, but at the same time it's an error prone design, as computations should never start async by accident, blocking should be the default. C# also has no useful interruption model. Java's interruption model is error prone, but at least you can work with it. Async/await also splits the standard library and the ecosystem in 2 (blocki…
Do give async/await in C# a try, it has all the structured concurrency features other languages have to invent APIs and special syntax for :) (if you want to take a look at good structured concurrency, you might be interested in Swift implementation)
The async/await syntax works with the language's other statements, but for a long time it had gotchas. It doesn't qualify as "structured concurrency", and it has the aforementioned issues — it's (accidentally) error-prone, it splits the ecosystem in two, and has no interruption model.
I am not familiar with Swift, but I think you can hardly beat Kotlin's implementation. This is a good introduction from Kotlin's lead:
Re: Java 21 makes me like Java again
#363Earlier quoted context omitted.
As someone writing code on Java since v1.0 and making tech strategy decisions on the C-level, I consider myself sane and experienced enough to say that Java is something that will do the job well and can be the primary choice for startups and new projects. Kotlin as a platform is not mature enough to deserve the same qualification.
The job of software engineers is to translate a business domain into software. Different languages are better or worse at modeling different domains of problems. I have seen the same problem solved in different languages take 2-3x the amount of work and have a large difference in ongoing maintenance costs. Java's reliance on traditional OO means that only a small subset of business domains naturally map to the langua…
In my career I worked on a really wide range of business domains and have not even noticed the problems you are talking about.
The problem of mapping certain types like unsigned int that you mentioned is rather rare integration scenario. There’s not that many domains where numbers with the most significant bit are important, but MAX+1 size numbers are not.
Re: Java 21 makes me like Java again
#364In other news, we have an upgrade path at work to go from Java 8 to Java 11 pretty soon.
What were the backward incompatibilities preventing that move? I thought Java was pretty backward compatible, but I've heard this a lot.
Re: Java 21 makes me like Java again
#365Earlier quoted context omitted.
I have not used Go generics, but it's viability as a business logic language would depend on that.
Wait, what? Generic programming is a perfectly valid style, but are you saying it's essential to implement business logic? Because, like, the last 3 languages that got adopted as the default business logic language didn't have them (Java pre 1.5, C, and Cobol).
Re: Java 21 makes me like Java again
#366The biggest feature in Java 21 is the release of Virtual Threads: https://openjdk.org/jeps/444 For some reason, this is missing from the article. If there was any feature that would sway existing Golang developers to switch to Java, it would be this. It would perhaps also convince the haters of the reactive-style concurrency patterns.
Is there a good honest writeup on why is this interesting? Very curious.
The earliest JVMs had this, green threads. Performance was terrible so it was eventually dropped.
I want to fully utilize every CPU and every core I have, why do I want green/virtual threads again?
Re: Java 21 makes me like Java again
#367Can you convince me to use Java? I’ve never used it (only C++, Python, CL) but it feels bloated and dirty.
Nd it is very compatible with Java itself, interop is dead simple
Re: Java 21 makes me like Java again
#368Earlier quoted context omitted.
Do give async/await in C# a try, it has all the structured concurrency features other languages have to invent APIs and special syntax for :) (if you want to take a look at good structured concurrency, you might be interested in Swift implementation)
I worked with C# professionally. The async/await syntax works with the language's other statements, but for a long time it had gotchas. It doesn't qualify as "structured concurrency", and it has the aforementioned issues — it's (accidentally) error-prone, it splits the ecosystem in two, and has no interruption model. I am not familiar with Swift, but I think you can hardly beat Kotlin's implementation. This is a good…
Interruption is achieved through cancellation tokens and has to be handled by consuming methods. There is no way around it because interrupting execution at an arbitrary point would lead to all kinds of issues regardless of the language (unless it implements some form of transaction abstraction and rollbacks all uncommitted changes).
Re: Java 21 makes me like Java again
#369Re: Java 21 makes me like Java again
#370The problem with Java is not Java. It is Oracle and no amount of new features is going to fix that.
Can this fkin FUD finally die? Java is pretty much the safest bet on a longevity, stability, risk aversion spectrum. Also, Oracle just has a particularly bad PR, but it is not at all worse than any other similarly sized company.