Type-ifying void is probably one of the coolest idea's that were mentioned in here, and everything's really amazing. Without it, even with any-Generics, void vs the rest would be the one last distinction that could require Generic interfaces to be duplicated - Just like Func and Action in C# are still necessarily distinct types. Then we require only a proper bottom type and the lattice is complete (I believe).
@alathreon83152 жыл бұрын
A pattern matching that I would like to have is one with optionals, like Rust does : if(int foo = optFoo) println("foo is present : " + foo); (assuming that optFoo is OptionalInt)
@nipafx2 жыл бұрын
I like the idea! As I understood other discussions about this, `Map::get` wouldn't be a one-off, JDK-provided pattern, but an example of custom patterns that can e implemented inside and outside the JDK. If I got that right, a pattern for `Optional::get` could be easily provided.