News for hackers. Stuff that matters.
Re:OpenJDK mailing list: Null-safety and value types by yarg on Tuesday February 07, 2023 @05:58PM (#34701114)
There's not really a nice way of implementing the syntax without changing the language.

Although perhaps they could resolve this with magic imports?

    import java.lang.magic.optional;

    public class Foo{
        public static void main(String...args){
            Foo? f = ...;
            if(f){
                f.doThings();
            }
            f.doThings(); //compile time error
        }
    }
The idea being that importing the magic class enables the cleaner syntax.
Re:OpenJDK mailing list: Null-safety and value types by usrusr on Wednesday February 08, 2023 @04:37AM (#34706046)
I doubt that it's possible to open the door for "language version by imports" without turning that decision into a forever-floodgate. Note that I am not entirely sure that it would be a bad decision (I do lean in that direction however), but it would definitely be a severe one.

It would be like a variant of inviting Dracula across the doorposts, only that this one may or may not actually be a cool guy and not a vampire, but in any case he will sure bring all his friends, and their friends and so on forever.

Re:OpenJDK mailing list: Null-safety and value types by yarg on Thursday February 09, 2023 @12:26AM (#34720107)
With great power comes great responsibility.