Inheritance is great 1- the simplest, purest for thereof is prototype inheritance; but if your language only offers classes, this happens at the metalevel only. 2- classes are fine; but if your language only offers typeclasses, this happens at the metalevel only, with no state.
-
-
At heart, prototype inheritance is composing functions of which you'll later find a fixpoint. See the implementation in two functions the Nix standard library. Or in under a hundred characters of Scheme.
-
To define a "class", refine the prototype for the class descriptor. No need for a fancy type system here; your prototypes can be monomorphic... at the meta-level. You may still want simple row polymorphism at the object level.
- 1 more reply
New conversation -
-
-
I see. Incremental refinement and extension of program behavior, configs, deps, etc. interests me. But I generally favor approaches based in constraint systems and multi-stage programming. Now I must contemplate utility of prototypes for the role.
-
See notably my Lisp Interface Library and accompanying paper. The inheritance of AVL < height-balanced < balanced < binary tree (plus many other steps) makes for great incremental definitions.
- 4 more replies
New conversation -
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!