Earlier quoted context omitted.
> I'm not sure if that's what you meant; the ML approach is quite different. There is a difference in approach because in Common Lisp each method is a separate function definition (though macros can alleviate this), but my point is that both CL and ML are more function-oriented, if you will; i.e. "methods" (or whatever you want to call ML pattern-matched functions) aren't defined in a class body and are just ordinary…
Oh, thanks! I didn't know that about defgeneric . How would you classify Ruby? You can reopen a class and add more methods to it at any time.
String.define_method :yell do
puts self.upcase
end
Numeric.define_method :yell do
self.to_s.yell
end
What I like most about Ruby is how close it gets to Lisp's flexibility of semantics (i.e. macros) without actually having macros. (Common Lisp is still my favorite language for larger projects though.)