3 ms·
Hi, Nova dev here. Yes, basically. And removing structural inheritance.
by aapoalas 1y ago
Hi, Nova dev here.
Yes, basically. And removing structural inheritance.
- throwaway894345 1y agoCan you elaborate on "And removing structural inheritance"? Does that mean Nova doesn't use traits, and if so, why would that matter?
- aapoalas 1y agoTraits are a type of interface inheritance; base classes and inherited classes à la C++ is structural inheritance. So basically it just means that I have to write more interfaces and implementations for them, because I don't have base classes to fall onto. Instead, in derived type/class instances I have an optional (maybe null) "pointer" to a base type/class instance. If the derived instance never uses its base class features, then the pointer stays null and no base instance is created. Often derived objects in JS are only used for those derived features, so I save live memory. But: the derived object type needs its own version of at least some of the base class methods, so I pay more in instruction memory (executable size).