Remix.run Logo
gavinray a day ago

Honestly, lack of the ability to write free-floating functions in Java.

Recent Java features like records, pattern matching, sum types via sealed interfaces have certainly made it a much more ergonomic and modern language.

But having to wrap everything in "class" feels ludicrous to me.

The other ones are lack of explicit null types (meant to be addressed by JEP "Null-Restricted and Nullable Types") and inability to write anonymous types for functions.

For example, something like:

   fun withCallback(
      handler: (A, B, C) -> D
   )
In Java, you have "Function3<A, B, C>" etc