• AdamBomb@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    10
    ·
    6 months ago

    Null reference checking by the compiler is enabled by default in new C# projects.

    C# doesn’t come with an option monad in its standard library, but its cooler sibling F# does.

      • anus@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        6 months ago

        Good idea, then patch the whole standard library and dotmet framework and most popular libraries to use that tiny library

      • AdamBomb@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        Yeah, 100%. I don’t really recognize the complaint that “it isn’t in the standard library” as being super valid. If you know what an option monad is and you want to use one, you can certainly create one. Lots of people don’t know what it is and won’t miss it, especially in this context since the option monad is a functional construct and C# is an objects-first language.