Re: macros
Thomas A. Russ wrote:
Seamus MacRae <smacrae319@live.ca.nospam> writes:
anonymous.c.lisper@gmail.com wrote:
(defgeneric frobnobdicate (a b)
(:method ((foo foo) (bar bar)) ;;arguments
.. body)
(:method ((foo foo) (baz baz))
..body))
(defclass foo () ;; no inheritance
(AttributesHere))
(defclass bar ()
(AttributesHere))
(defclass baz ()
(AttributesHere))
(defclass bat (baz) ;inherits from baz
())
Then I can do:
(frobnobdicate InstanceOfFoo InstanceOfBar)
(frobnobdicate InstanceOfFoo InstanceOfBaz)
(frobnobdicate InstanceOfFoo InstanceOfBat)
Eh, I don't see any namespace related anything in that. I do see
manually managed dispatch tables and plenty of other migraine-inducers
though.
Precisely. It doesn't enter into this at all, in most cases.
It is nicely in the background for when you need it, but it doesn't
intrude into your day-to-day programming most of the time.
[More Lisp-specific stuff] ...
As fascinating as this Lisp conversation is, it's off topic for a Java newsgroup.
--
Lew