Re:Three unique features of Lisp in 2010
by ScottBurson on Saturday January 29, 2011 @06:47PM
(#2156817)
> To the extent this makes sense, it's equally true of Common Lisp.
I'm afraid not. Christophe Rhodes has a proposal for an extensible sequence protocol, but AFAIK it is implemented only in SBCL. There's no portable way in CL to extend the built-in hash tables. And you certainly can't have your own cons class that responds to the built-in CAR and CDR.
Of course you can always shadow the builtin names and redefine them in your package as generic functions; this is what I did in my FSet functional collections library. But that's not quite the same thing as having extensibility designed in.
I'm afraid not. Christophe Rhodes has a proposal for an extensible sequence protocol, but AFAIK it is implemented only in SBCL. There's no portable way in CL to extend the built-in hash tables. And you certainly can't have your own cons class that responds to the built-in CAR and CDR.
Of course you can always shadow the builtin names and redefine them in your package as generic functions; this is what I did in my FSet functional collections library. But that's not quite the same thing as having extensibility designed in.