Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



"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).


The class and instance evolution protocols for starters seem not all that easy.


Exactly. Under the sheets you need class wrappers at a minimum to support these things.


“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-metaob...


I'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...


Though possible. See for example https://github.com/blakemcbride/Dynace




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: