3 ms·
I think you are right. I see it as a form of multiple inheritance, a new one which no other language has.
by paufernandez 5y ago
I think you are right. I see it as a form of multiple inheritance, a new one which no other language has.
- throwaway894345 5y agoSort of. Inheritance extends (hence the keyword of the same name) while constraints restrict (or constrain).
- verdverm 5y agoInheritance also allows overrides, which is something CUE errors on. CUE has Go like embedding so you can reuse common schema or config. CUE's constraints are in the "middle" of the spectrum (lattice, partially ordered graph) from abstract types to concrete data.
- verdverm 5y agoIt's called unification and exists in many languages, Prolog is a well known one. CUE is in the logical language family. It uses Typed Feature Structures which originated in NLP before deep neural networks became capable. It is specifically not inheritance where overrides are allowed.