Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!shelby!neon!neon!gumby From: gumby@Cygnus.COM (David Vinayak Wallace) Newsgroups: comp.lang.lisp Subject: (not (equalp 'flet objects)) Message-ID: Date: 15 Aug 90 01:41:21 GMT References: <1990Aug4.001913.22597@Neon.Stanford.EDU> <1990Aug13.201712.19721@Neon.Stanford.EDU> <3201@skye.ed.ac.uk> <1990Aug14.235816.11255@Neon.Stanford.EDU> Sender: news@Neon.Stanford.EDU (USENET News System) Organization: Cygnus Support Lines: 33 In-Reply-To: michaelg@Neon.Stanford.EDU's message of Tue, 14 Aug 90 23:58:16 GMT Date: Tue, 14 Aug 90 23:58:16 GMT From: michaelg@Neon.Stanford.EDU (Michael Greenwald) jeff@aiai.ed.ac.uk (Jeff Dalton) writes: >If there was better support for it in Common Lisp implementations, >I might want to write "modules" like this (perhaps with the aid of >some macros): > (let (...) ; private variables > (labels (...) ; private functions > (defun ...) ; public functions > ... )) >So the "parent" might be quite large. It's possible I'm not understanding you clearly. Why isn't what you describe simply a single instance of a class? The private variables are slots, the private functions are GENERIC-LABELS (or in pre-CLOS flavors, DEFUN-IN-FLAVOR's) and the DEFUNs are DEFMETHODs? It was certainly the case that you did not have to recompile the DEFUN-IN-FLAVORs every time you recompiled a defmethod. I assume (hope) that GENERIC-LABELS is similar. Because the generic functions would have to recieve the single instance of an argument, while under Jeff's scheme (and in Scheme) the sole discriminator is the name. Of course in scheme, unlike cl, the defun-ed/define-ed names would not be apparent outside the bounding let.