OO addict: you should compose functions, but only at the meta-level, before you compute type fix-points. Sums should always be extensible. FP addict: you should compose functions, but only at the base-level, after you compute type fix-points. Sums should never be extensible.
-
-
Replying to @Ngnghm
What are type fix-points? I’m thinking a:Type -> b:Type when a ~ b, but I don’t see how that fits with the rest of it.
1 reply 0 retweets 0 likes
Replying to @holiconfig
To define the semantics of a class, consider that it defines a monotonic function from type to type. Inheritance is composing these functions for all classes in a class's precedence list. The type of direct instances of the class is the fix point of this composed function.
5:43 PM - 7 Mar 2019
0 replies
0 retweets
1 like
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.
Read my blog!