4 ms·
Yea, I really like GADT too much to give it up. With Swift/Haxe/Rust/Haskell/F# all having them. You may find this interesting, someone implemented a parsec-l
by munro 12y ago
Yea, I really like GADT too much to give it up. With Swift/Haxe/Rust/Haskell/F# all having them.
You may find this interesting, someone implemented a parsec-like library in Go [1]. I haven't wrapped my head around it completely, but it looks like it's all dynamic [2].
[1] https://godoc.org/github.com/prataprc/goparsec https://godoc.org/github.com/prataprc/goparsec
[2] https://github.com/prataprc/goparsec/blob/master/json/json.go#L60-L86 https://github.com/prataprc/goparsec/blob/master/json/json.g...
- platz 12y agoAre you sure GADTs are possible in Swift and F#? I haven't seen what syntax supports that in those languages. Do you just mean Discriminated Unions (i.e. ADTs). There is a difference between GADT and ADT.