Earlier quoted context omitted.
Citation needed; first off, verbosity is not the problem, verbosity is NEVER the problem; any significant codebase will end up with millions of LOC (and tokens) regardless of language choice. Second, Java's infamous for having VeryLongClassNameFactoryBeans on the one hand, and deep class hierarchies on the other, with new classes being declared for everything. Third, it depends. You can set up a HTTP server in two or…
We were talking about PL features, and now you bring up a style of writing said language (which by the way comes from very different times and is no longer the norm)? Composition over inheritance has been a mantra in Java circles for a very long time now. The important difference is for example that Go can’t have proper error handling no matter how good the developer is, due to the language not having a proper abstra…
Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
391–400 of 555 posts
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#392Earlier quoted context omitted.
How so? Linux is a first class citizen in .NET these days.
A first class citzen would have support for MAUI, and something better than VSCode like macOS gets VS4Mac.
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#393Earlier quoted context omitted.
C# already had all the advantages of Go (more or less) and more, yet Go is still growing. This has nothing to do with the technical capabilities of the languages.
C# GC, MS and external libraries, build, docs, tools support (especially for Linux) are all worse than Java.
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#394The biggest win by far IMHO is a performant alternative for io intensive applications for async frameworks. Not using an async framework tremendously simplifies your code. Code complexity has an enormous projection on everything else, especially when talking on the business level. First and foremost the cost of development and time to market rises. And then comes the cost of maintenance.
If you want to run concurrent io requests, don't you still need to use an async framework and all the fork/join logic? I suppose the slow and naive way is now easier to let limp along as you won't run out of threads?
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#395Earlier quoted context omitted.
> How are Jars more portable than Go binaries when you need Java installed to run Jars? Uh, you don't...? https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpa... > you don't need many libraries to begin with. This really depends on what you're doing. Having many libraries creates a lot of weird potential. You can absolutely subsist on less, but you can do more with more. A while back I found myself wanting to…
> Each format must be built on the platform it runs on, there is no cross-platform support. So now you're back to platform-specific packages, except you don't have Go's support for cross-compilation. Hardly much of an advantage.
https://conveyor.hydraulic.dev/
It's not JVM specific but it does understand how to bundle the JVM, use jlink to shrink it, read your classpath from Gradle etc.
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#396Earlier quoted context omitted.
Depends what the JARs do of course. Some desirable libraries are unfortunately slow. PicoCLI for argument parsing is one. It's got every feature you might ever want, but, it adds a couple hundred msec to startup. There is a HotSpot feature called AppCDS. It improves startup time by about 30% in my experiments. However you have to turn it on. Just running `java -jar` won't do it. Then there is GraalVM Native Image. It…
> PicoCLI for argument parsing is one Doesn’t it generate every additional code at compile time? I didn’t notice it slowing down my startup times, it’s mostly every other lib (which you usually have, as what’s the point of a hello world cli app)
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#397Earlier quoted context omitted.
Finally got to the answer. So it IS paid from one particular vendor. I understand there are free options. But that makes it a mine in a field if you are not knowledgable enough. It went this deep into threading to really get an ack that there is a big red O' mine in there. And there is one piece that wont run without big red O... :(
Since OracleJDK is also just OpenJDK with a logo, I don’t believe that there is any software that runs on any recent OracleJDK but not on OpenJDK.
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#398Earlier quoted context omitted.
The only example in the article does an explicit task though (in the form of a closure) e.g. something.submit(() -> { task code });
Don't be confused by the example, which semantically just shows a thread pool. It is hard to give an example in code as virtual threads ideally are purely an implementation detail and otherwise just look like normal threads. In a typical thread pool if you schedule more long running tasks than you have worker threads, you either have to queue your tasks waiting for a free worker or you have to spawn a new worker. If…
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#399Earlier quoted context omitted.
JetBrains Rider is available for Windows, Linux, and macOS, and it's much better than VS, VS for Mac, and VSCode. It's not free, but VS isn't either for any serious commercial usage, and Rider is certainly worth the money.
Workarounds, and still doesn't fix the issues lacking from the company that owns .NET.
What does the Python core community offer? IDLE is ugly, is barely an IDE, and didn’t have line numbers until a few years ago. Everyone is using PyCharm or VSCode.
Re: Virtual Threads Arrive in JDK 21, Ushering a New Era of Concurrency
#400Earlier quoted context omitted.
To be fair, .NET only recently got AOT compilation and single binary (or self-contained) deployments as officially supported features.
If you target the classic .NET Framework on Windows, you could just ship a single folder for a long time The .NET Framework is shipped with Windows (though not necessarily at the latest version), and the deployment strategy for your average desktop/console app is just "copy the entire bin folder".