Re: with-slots usage question
"Robert P. Goldman" <[email protected]> Mon, 10 Nov 2003 14:29:06 -0600
| Newsgroups | gmane.lisp.clump |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Marco" == Marco Baringer <[email protected]> writes: Marco> "Robert P. Goldman" <[email protected]> writes: >> I feel awfully stupid asking this, but.... Can't you just shadow >> LENGTH and STRING in your package if you want to override them? >> >> So I can make a generic function for LENGTH that has as its default >> method (for type T) COMMON-LISP:LENGTH, and put whatever other methods >> I want for it. Yes? Marco> yes, until you want to do that to a function with optional, Marco> keyword or rest args. I think I understand and agree. This fixes the problem of name collision, and lets you use the built-in defuns. But it's no help whatsoever, if you want to have functions that are polymorphic wrt arguments. Then you end up with functions where you can get heinous argument mismatch errors. Yes? Also, of course, the case of string shows an unpleasant case where we are hurt by the fact that packages export symbols, willy-nilly giving you (or taking away) type declarations and values as well as function definitions.... I confess I don't know how to make it work, but I'd love to see CL have real interface definitions, instead of packages... R Marco> -- Marco> -Marco Marco> Ring the bells that still can ring. Marco> Forget your perfect offering. Marco> There is a crack in everything. Marco> That's how the light gets in. Marco> -Leonard Cohen