freenode/#lisp - IRC Chatlog
Search
22:26:17
Xach
rdh: a generic function is like a thingy to which you attach methods. when you call a generic function, some (or none!) of the methods are selected to run if they match the arguments in some way.
22:29:22
Xach
if you define a method and it is selected, your object will be one of the arguments processed in some way by the code in the method. there can be many objects involved too - it's not helpful to think of an object as the "owner" of a method, it's just a participant in the selection of a method.
22:32:57
Xach
well, there are some good resources out there. try to avoid something that puts objects/classes first. it inhibits real understanding.
22:50:17
moldybits
i don't know if this is better, but at least it's more natural in clos to distinguish actions by how you name the function as opposed to letting the objects provide the context. (concatenate "a" "b") => "ab" (+ "19" "23") => "42"
2:45:40
aeth
Missing commas are pretty annoying. You wind up trying to access a variable that doesn't exist because the macro author only tested the macro with outer variables having the same name as the macro variable.
2:54:01
Bike
so like if a standard function "should signal an error" in some circumstance, if a call to it is safe an error will be signaled
3:12:36
Xach
Hmm, I thought change-class involved :default-initargs, but it doesn't seem to from my reading of the spec and experiments.
4:36:48
beach
asarch: If you find yourself using RETURN-FROM a lot, it might be that your programming style is not that great.
4:38:17
beach
Occasionally, in a loop, when the final value becomes known, it can be a good solution.
4:39:58
asarch
If a function need something like (foo ... (lambda (x y) ...)), how could I put (lambda ...) in a function and the pass that function to (foo ...)?