819 karma · joined January 8, 2017
[1] https://docs.openrewrite.org/reference/yaml-format-reference
[1] https://prettier.io/ [2] https://github.com/google/google-java-format
a class is also a type (if you have a typed language),
a class is also a module, you group together values that makes sense together (the x and the y of a point) with the functions (methods) that interact with it.
When you have a lot of codes flying around, you can add encapsulation (private/public thingy) so the user of a code does not see the implementation which helps to create libraries that can evolve independently from the applications using them.
Also compared to an associative array, a class is more compact in memory (granted JavaScript runtimes see dictionaries as hidden classes).
But you are right that Oracle unified all paid/free versions of Java under the OpenJDK banner, even Android is using the OpenJDK now.
The code compiles but from time to time it fails at runtime and performance are sometimes Ok, sometimes not depending on the call stack.
[1] https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...
Optional will be retrofitted to a value class not a primitive class, you get flattening but only on stack (parameter type or return type) not on heap (field).
I don't really understand the end of the part3 (the VM model), so i may be wrong.
It's what Swift does if inlining is defeated, the type arguments are passed at runtime as a classical argument on stack.
You don't need full reflection as you suggest, only to be able to materialize the types as structs + an interface at runtime. Yes, it's a little slower but most of the overhead comes from the function not be inlined.
https://medium.com/@asankhaya/reason-with-ocaml-b75697a6c00b
You can see the discussions on HN about Gnome removing features as a good example about how hard it is.
The Java Security Manager is an API that allows to intercept and run codes, so devs use it as a Trojan Horse to patch code instead of fixing the root of the issue.
The Java Security Manager should die.
[1] https://www.securityweek.com/hash-table-collision-attacks-co...
Oracle engineers did the first implementation for Java 7, more recently it's mostly contributions from Intel, AMD and ARM [1].
[1] https://cr.openjdk.java.net/~vlivanov/talks/2019_CodeOne_MTE...
Both those restrictions are fixed, granted that this is not yet in the offical API, it's an incubation module (the equivalent of from __future__ of Python).
https://docs.oracle.com/en/java/javase/17/docs/api/jdk.incub...
It's the reason why the transition from Java 8 to 11 has been painful.
Recent versions of Java (Java 8+) avoid structural types but provide structural conversions + inference.
We will see with the recent introduction of named records/tuples goes in the same direction or not.
com.google.common.base.Predicate<String> guavaPredicate = ...
java.util.function.Predicate<String> predicate = guavaPredicate::apply;2. create following the rules
3. break the rules
It's like the doesNotUnderstand in SmallTalk, method_missing in Ruby or more recently .Net Dynamic Language Runtime or invokedynamic in Java.
Sadly, the two benchmarks are not equivalent, the Rust version loop over ints, the Java version loop over longs.
Looping over longs is notoriously slow in Java, because there is no vectorisation and the JIT insert insert a GC checks because looping over longs may take a long of time.
Also one of the codes uses Optional<Long> instead of OptionalLong, so the code does a double boxing long -> Long -> OptionalLong.
For Rust, one of the feature of Rust is to have a minimal runtime, so using a compiler transformation seems a good fit.
For C#, Microsoft has a limited number of people working on the runtime of DotNet. Async/await was developed at the same time DotNet was transitioning to DotNet Core which also requires massive engineering, so it was about priority. The future will tell if at some point coroutine will be added to DotNet.
Java is Still Free (2019) https://medium.com/@javachampions/java-is-still-free-2-0-0-6...
I don't know if there is a more recent version
[1] https://docs.spring.io/spring-native/docs/current/reference/...
[1] https://docs.spring.io/spring-native/docs/current/reference/...