Everything Java does, C# does better. Java shouldn’t still struggle with generic arrays...but it does. Java should easily have first-class pointer support by now. C# does but Java doesn’t. Checked exceptions should have long been put to bed by now...but they haven’t. The only reason to use Java atm is interop with another JVM language (e.g. Clojure) or to not get locked into the MS ecosystem. C# is otherwise just str…
People might find you a bit offensive, but I’m really curious if anyone has a counterpoint to this.
I don't see the argument for pointers. If you want C++, use C++.
Re checked exceptions: they're great. Document how your code can go off the rails or prevent it.
> 25 years of libraries to choose from slowly not available on Android. > If the Android team plans to rewrite all of them in Kotlin, be my guest. What are you talking about? Android developers can use Maven Central like any other Java developers without care about what JDK these dependencies were compiled with nor even whether they were written in Kotlin (most did not, obviously). > I am also looking forward to the…
They definitely can not use them, when they they make use of JVM features or JDK libraries delivered post Java 8. Stating otherwise just proves that you don't know Java. Android Studio and the complete Android toolchain runs on top of a JVM implementation, as the JVM moves forward, JetBrains will be forced to update InteliJ to take advantage of newer JVM versions, which will force Google to update all their Android d…
When was last time you used a dependency on Maven Central and Android said "Nope, sorry, can't use that"?
The guy who wrote the most lines of JVM code ever( Prof. Odersky) , who wrote the compiler that became the first javac compiler, who added generics to java5, himself moved away from java to create scala. Once you use something like scala or even kotlin,you never wanna go back- you realize java world is just playing catchup, They are now like a cola company advertising diet cola is healthy. The functional part of java is not really functional ( allows immutability). They just are trying to survive ,and are trying to add all kind of features to java, just to play catch up. I heard they are planning to add pattern matching in the latest version.
The guys who make some excuse, like kotlin or scala is hard, can really be compared to an older car mechanic saying tesla is BS because their knowledge will become obsolete if it takes off. If you really think a language is hard , you are not supposed to be in the programming business. Also these same guys just use java to program the web. Heck, java is fast but the cost of lost developer productivity in waiting for compilation cant be justified cant be justified for the saved 100 millisecond of processing time. What matters on the internet is the perceived speed and the page load time, and there are so many other ways to achieve that. Like simply upgrading to http2. Or preloading html , js and then “hydrating” the page. The entire source code of the forum dev.to is opensource and you can visit the website to see how fast it is. And its not written in java. This is just an example. Facebooks wasnt written/ hosted on the “enterprise” java. While java is fast and is suited for low latency data processing ( like trading system, or big data), I hate that even with the love it receives, 98% of the so-called java guys just use it for web programming. - Also scala beats java at the thing java does best- fast processing. Ever heard big data processing with spArk.
I imagine Java's approach to concurrency and parallelism might be quite different if it were designed today. Probably not, actually. Project Loom's initial goal was to rethink concurrency on the JVM from scratch. What they came up with was: * Make threads really, really cheap * Make thread locals work better (as scoped locals) * Add a few Executor utilities to help you control sub-tasks better (structured concurrency…
Your characterization of Loom is, I think, pretty accurate. There are, however, a few things in Java's early concurrency support that make various things harder, including Loom, and we're having to put some extra effort into grappling with them. Probably the most obvious is the fact that the language and VM requires every object to have a monitor lock that can be synchronized and waited/notified. In 1996 this was vie…
That's true but if Java had been designed with a "synchronizable" keyword applied to classes, I wouldn't consider that a radically different language. The prevalence of unnecessarily lockable things is unfortunate from a JVM implementors perspective, slightly convenient from a user's perspective, but ultimately not a defining feature of the language or platform even if it may have seemed important in 1995.
When I think about Java concurrency today I tend to think of java.util.concurrent or the JMM. Perhaps that's odd.
They still need some more time with GraalVM. Currently you need Microsoft's C++ Compiler in order to use GraalVM on Windows. They will need time to polish these things... But GraalVM performance is already on par with HotSpot - with better startup times!
> Currently you need Microsoft's C++ Compiler in order to use GraalVM on Windows No need for xcode on os x or gcc on Linux, or clang on bsds?
As a counterexample, springboot is the quickest thing to get start and yet allows you to do complex stuff. I for one, love it.
> springboot is the quickest thing to get start What do you mean by this? Startup times, or developer onboarding? Because I've had this conversation before if the latter. To me, Spring seems like the last gasp of "Enterprise" Java. Too much is implicit and obscure (aspect-oriented programming is an anti-pattern, IMHO), too much is configured (yuck, XML). Each to their own I guess.
You need xcode on OS/X and gcc on Linux. See here: https://www.graalvm.org/reference-manual/native-image/#prere...
Maybe I misunderstood your post then - why is needing the platform c++ compiler an issue on windows, but not mac/linux?
It is an issue for all platforms - I just mentioned Windows, because I work on Windows. And the issue is: Why do I need a C++ compiler if I would like to develop in Java?