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

> You can implement this in Lisp. The dispatch will be at runtime, not compile time.

That would be fine with me, but...

> I don't think CLOS supports this use case, but the rest of Lisp certainly does.

How exactly? Manually branching on the type of an object is ugly and non-extensible, and thus the antithesis of good modular design. Or are you proposing creating a whole new object system, in parallel to CLOS, but which supports this one additional feature? My copy of AMOP suggests that the design of CLOS is intended to avoid this kind of scenario:

“The metaobject protocol approach (...) is based on the idea that one can and should "open languages up," allowing users to adjust the design and implementation to suit their particular needs.” (p. 1)

“Rather than supplying the user with a fixed, single point in the space of all language designs and implementations, we would instead support a region of possible designs within that overall space. (...) Users are free to move to whatever point in that region best matches their particular requirements.” (p. 5-6)



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

Search: