Re:Execution in the Kingdom of Nouns (2006)
by arethuza on Wednesday February 13, 2013 @11:54AM
(#5214125)
Well, with CLOS you really define your verb behaviour on tuples of nouns (methods) and the verbs (generic functions) are separate and you can, if you want, get as creative as you want as to how your methods get invoked by your generic functions.
[Mind you, it's been a while since I developed in CLOS, so apologies in advance if this is incorrect].
Re:Execution in the Kingdom of Nouns (2006)
by flyinRyan on Wednesday February 13, 2013 @12:51PM
(#5214481)
>Well, with CLOS you really define your verb behaviour on tuples of nouns (methods) and the verbs (generic functions) are separate
You can do this in any OO language as well: with multi-dispatch patterns. What makes CLOS so powerful is that you can do multi-dispatch without resorting to things like the visitor patters. Simply write what you mean with no boilerplate.
Re:Execution in the Kingdom of Nouns (2006)
by dschiptsov on Wednesday February 13, 2013 @12:01PM
(#5214169)
CLOS is really required in about 5% of very specialized tasks, such as simulations.
Re:Execution in the Kingdom of Nouns (2006)
by arethuza on Wednesday February 13, 2013 @12:27PM
(#5214336)
I'm not sure - "simple" CLOS is really pretty simple and arguably works in a more intuitive way than most OO environments. However, if you do want more sophistication, as with most of Lisp, taking the Red Pill of the MOP can take you as deep as you want to go....
[Damn - I really need to do some more Lisp development]
Re:Execution in the Kingdom of Nouns (2006)
by pnathan on Wednesday February 13, 2013 @01:23PM
(#5214709)
I would agree with this... basic defgeneric/defmethod/defclass work is straightforward. It's when you start with the advice partial methods and the MOP that things get... exotic.
(I read the AMOP earlier this year and I'm pretty sure I haven't recovered from that mind bender).
Re:Execution in the Kingdom of Nouns (2006)
by Apocryphon on Wednesday February 13, 2013 @12:10PM
(#5214233)
This metaphor can be the new "how programming language X shoots yourself in the foot." (http://www.toodarkpark.org/computers/humor/shoot-self-in-foo...)
I would love to see how C/C++/ObjC would also express a feline upon a fabric.
Java:
This is an instance of an mammal of an animal kingdom which doesn't include dolphins and whales, which has a..., placed within the instance of a class Plain of polymorphic shape which has some private attributes...
ML-family:
This is a member of a set of only mammals of animal kingdom, excluding dolphins and whales, of small size, which has a..., located on the member of a set of geometric figures....
Lisp:
The cat sat on the mat.