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

some comments on CLOS

Comments on CLOS ch1 and ch2.
  (since I have been on this list
   from two day ago, so I do not know
   the current context.)

   1. explanation around the mixture of defmethod and defun.
   I could not find the specification on the mixture of
   defmethod and defun with the same name.
   is it error ? is it allowed in what sense?

   2. for user convenience, explicit interface of
   'make-specializable' in the former version is 
   better than the current way for doing the same
   thing using 'user-added-method' or something.

   3. Removal of a class and a method.
   how user can remove one method ?
   how user can remove a class ?

   4. Enumeration in the individual method.
   (defmethod foo ((x (eql A)))
   (defmethod foo ((x (eql B)))

   I have an experience to write
   methods which have several sigular
   points, and whose bodies are same.
   I feel happy if a syntax like,
   (defmethod foo ((x (member A B C D)))
    which shares the same body for the enumerated
    individuals will be in the specificaton.

   5. 2-79 symbol-macrolet examples
     ;;; not (let 'foo (let (('foo 'bar)) 'foo)).
     ;;; not (list 'foo (let (('foo 'bar)) 'foo)).

   6. 2-8  line 9
	   Osub1 | ... | Osubn
	   and line 14
	   .... for some 1 <= k <= n, ...

	   'n' is ambiguous to the 'n' of line 13.
	   line 9
	   Osub1 | ... | OsubN
	   and line 14
	   ... for some 1 <= k <= N, ...
	   replacing small 'n' to large 'N'.

   7. 1-19 to 1-21 Integrating Types and Classes
	   Fig 1-1.
   I prefer 'sequence first rule'.
   For instance,
   the class precedence list of 'null' should be
   (null list symbol sequence t)
   (null list sequence symbol t)
   rather than
   (null symbol list sequence t) which
   is on Fig 1-1.

   How are the discussions on the issue ?
   (defmethod foo ((x list))
   (defmethod foo ((x symbol))
   (foo nil) ?
   I feel we cannot absolutely define
   the precedence among them.
   meta object protocol will solve this problem ?

   8. 1-21 
   pathname and stream should at least be
   defined to correspond to classes
   independent from the context of 1-21.
   (since several file handling are OK for
   pathnames and streams)

   (defmethod device-analysis ((x pathname))
   (defmethod device-analysis ((x stream))

Masayuki Ida