Re: with-slots usage question
Nikodemus Siivola <[email protected]> Tue, 11 Nov 2003 00:00:23 +0200
| Newsgroups | gmane.lisp.clump |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Nov 10, 2003 at 02:15:37PM -0600, Robert P. Goldman wrote: > I feel awfully stupid asking this, but.... Can't you just shadow > LENGTH and STRING in your package if you want to override them? "Yes, but I don't want to." > 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? This I had not actually thought of. I like the idea in essence, but have the feeling that this is asking for trouble. In the very least, STRING is also a type specifier, so the amount of hair is greater then just shadow + defgeneric. (Applies to VECTOR, ARRAY, etc. as well.) Fortune favors the bold, though, so I've adopted this in Linedit in spirit of experimentation. Upsides of tiny codebase and utterly non-critical application. ;) Cheers, -- Nikodemus _______________________________________________ Clump mailing list [email protected] http://manly.caddr.com/mailman/listinfo/clump
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/sAp2bSpkIAKPfsURAl4nAJ43y4qW7DPpsrZaJaBgSdMJo7UY2ACdGWFa 7Nq54EAh+0t89uAYL/lpcNo= =79La -----END PGP SIGNATURE-----