• Simon 𐕣he 🪨 Johnson@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 days ago

    I’m not sure what you mean specifically.

    You restrict the set of statements that are possible to express to ones that can be checked by the type system, and as a result you get additional compile time guarantees

    This to me just sounds like you’re ultimately talking about the Command Pattern, which can be used regardless of type system. Because in statically typed languages you’re always restricted to the type system, it’s just that most type systems suck, the ones that don’t don’t see very much play in enterprise environments.

    What I’m talking about is the Enterprise tendency to select and enforce usage in other languages of types in such a way that every single piece of data, function input and output has a explicit type. Leading to a lot of code maintenance and difficulty that scales only with a tech strategy where you add bodies and maintain more code rather than intelligently composing your types and allowing the system to use type inference to lower maintenance overhead and code movement.