Record type inference for dummies

haskellforall.com

67 points by g0xA52A2A 3 days ago


PashaGo - 5 hours ago

Anonymous records feel like one of those features that are obviously useful once you work with JSON-heavy systems, but surprisingly uncommon in statically typed languages

vatsachak - 12 hours ago

An anonymous record type in a language whose type system is an enum LangType in Rust is just HashMap<String, Box<LangType>>

My pet project requires an STLC with anonymous record types and type inference for anonymous records wasn't too bad

antonvs - 5 hours ago

The article missed Go’s anonymous structs:

    p := struct {
        Name string
        Age  int
    }{
        Name: "Alice",
        Age:  30,
    }