TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mixins in Common Lisp

5 pointsby Abhinav2000over 3 years ago

1 comment

pfdietzover 3 years ago
Mixins 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.
评论 #29302526 未加载