5 ms·
> I don’t know the exact implementation details of CLOS, but I feel that it can be easily replicated in C This makes me think he's barely scratched the surface
by EdwardCoffin 4y ago
> I don’t know the exact implementation details of CLOS, but I feel that it can be easily replicated in C
This makes me think he's barely scratched the surface of what CLOS has to offer.
- twoodfin 4y ago“Easily” is a stretch, but with a few Lisp->C idiom translations, you could follow along straightforwardly with “The Art of the Metaobject Protocol”[1]. [1] https://mitpress.mit.edu/9780262610742/the-art-of-the-metaobject-protocol/ https://mitpress.mit.edu/9780262610742/the-art-of-the-metaob...
- EdwardCoffin 4y agoI've read the MOP too. I seriously doubt that this is the case. There is a lot just below the surface in CLOS that a casual encounter would not reveal. This post [1] by Joe Marshall gives a taste of how these features can go unnoticed until you need them, then you appreciate CLOS for these things. [1] CLOS!? https://www.ca.crh.com/host-http-funcall.blogspot.be/2013/07/clos.html https://www.ca.crh.com/host-http-funcall.blogspot.be/2013/07...
- zachbeane 4y agoThe class and instance evolution protocols for starters seem not all that easy.
- dreamcompiler 4y agoExactly. Under the sheets you need class wrappers at a minimum to support these things.
- mikelevins 4y ago"Easily" is a stretch, for sure, but John Wainwright developed a framework that he called "oic", for "Objects in C", that was a fairly substantial subset of CLOS. I met him at OOPSLA ‘89 (or it might have been at AAAI) and introduced him to a couple of Apple developer guys, because I thought oic was cool. Whether because of that introduction or other reasons I’m not aware of, John ended up selling oic to Apple for use as the basis of the ScriptX object system, which was the programming language of the Kaleida Media Player (https://en.wikipedia.org/wiki/Kaleida_Labs https://en.wikipedia.org/wiki/Kaleida_Labs).
- lispm 4y agoThough possible. See for example https://github.com/blakemcbride/Dynace https://github.com/blakemcbride/Dynace