Capital on Nostr: I've been thinking about the type system of #CrystalLang. It's got me wanting a ...
I've been thinking about the type system of #CrystalLang. It's got me wanting a language where types are grouped exclusively through sets. This can be either explicitly defined unions, interfaces, or something else.
But, there has been something bothering me. Something always felt off about inheritance under this model. And, I think I have finally figured it out!
Let's say you've got class A. You then derive classes B and C from A. If the type A is set of types, what would that be set?
But, there has been something bothering me. Something always felt off about inheritance under this model. And, I think I have finally figured it out!
Let's say you've got class A. You then derive classes B and C from A. If the type A is set of types, what would that be set?