Hacker News new | ask | show | jobs
by hi-v-rocknroll 745 days ago
I assume you mean algebraic data types as found in C#, Go (awkwardly), Rust, Swift, TypeScript, and Zig.

Also, gradual typing + ADTs: Crystal, Elixir and Erlang typespecs, Haskell, Python

Finally, dependent typing + ADTs: Ada 2012, Agda, Futhark, Idris, Lean

1 comments

Since when does Go have algebraic data types? Like, even "awkwardly", I can think of nothing that even come close.
He might be referring to switching on the type of an interface... Not ADT for sure but I mean it's possible as a cludge as a tagged union, but it's more akin to single inheritance to be fair...