[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nested class definitions

Common Lisp has taken the view that while there are local functions with
FLET /LABELS and local macros with MACROLET, there aren't any local
structures.    Lets suppose we had something like structure-let:

(structure-let (((foo (:type list)) a b c)
		  (baz x y z))
     (setq kk (make-baz ...))
     (baz-x kk)


This certainly makes sense for (:type list) because it doesn't entail
any global data-type-space manipulation, but makes less sense for
structures & classes? In a recursive call, are the types the same
because they share names? Or different? 


(let ((c (make 'class ...)))
	(add-method ....)


you clearly have a dynamic scope the class and its methods. However,
most languages that have "local types" use a lexical scope instead. How
can we get lexically scoped classes?