Mixins in Common Lisp
lisp.substack.com
Mixins in Common Lisp
1–3 of 3 posts
Re: Mixins in Common Lisp
#2Mixins play nicely with Common Lisp's method combinations, as one can attach a little bit of behavior to each mixin then use MC to weave them together. For example: suppose we want to build classes for the nodes of an abstract syntax tree. We create a mixin for each child slot, and produce a node class by subclassing from the appropriate child slot classes. A traversal function on ASTs assembles traversal methods for these mixin classes using the PROGN method combination.
Re: Mixins in Common Lisp
#3Mixins play nicely with Common Lisp's method combinations, as one can attach a little bit of behavior to each mixin then use MC to weave them together. For example: suppose we want to build classes for the nodes of an abstract syntax tree. We create a mixin for each child slot, and produce a node class by subclassing from the appropriate child slot classes. A traversal function on ASTs assembles traversal methods for…
[deleted]