• silasmariner@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 天前

    In reverse order:

    • Directly mapping structs to JSON is a solved problem in userland for every major language
    • yes it does, and worse it’s part of the return signature and null is super-prevalent of necessity as a result
    • even java doesn’t do that any more, but fine I guess
    • cool, but access modifiers actually make a lot of sense. Go’s solution to this is to use capitalisation as a marker, which has no ‘inferential readability’ – public/private is obvious. Foo/foo? Considerably less so

    Further, meta programming in go sucks donkey balls. Sure, it finally got generics but also they suck. Last I checked it still didn’t even support covariance.