Smalltalk, Go, Erlang, ...https://twitter.com/pcwalton/status/857677705738727424 …
-
-
Replying to @coreload
Strongtalk had sum types (well, union types). :) Erlang almost has them with its pattern matching.
2 replies 0 retweets 6 likes -
For the record: When I say "sum" I specifically mean type w/ exhaustive membership of disjoint cases, mutually exclusive between types.
1 reply 0 retweets 0 likes -
By contrast, I rather default to open membership, offer matching constructs that support overlap, and permit reusing ctors across types.
2 replies 0 retweets 0 likes -
I think the claim that we should all switch to OCaml polymorphic variants is pretty different than not wanting sum types.
1 reply 0 retweets 2 likes -
I'm trying to counter claim that sum types = universal improvement. Go gets pretty far with second class products & memory-safe down-casting
4 replies 0 retweets 0 likes -
Interfaces are my primary medium in Go.
1 reply 0 retweets 0 likes
If I had to choose between interfaces and sum types in a language, I’d pick the latter every time. Not even a close call.
-
-
Exactly why "horses for courses" is such a great saying.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.