freenode/lisp - IRC Chatlog
Search
22:22:17
aeth
White_Flame: Correct. When Lispers criticize design patterns as unnecessary in Common Lisp, I bring up the case of "macro design pattern" conventions, like with-foo (usually with an unwind-protect), define-foo (usually with a defun, but maybe it deals with a different global definition), do-foo (iteration), etc.
22:22:55
aeth
White_Flame: Although to be fair, you could turn some of these into macros, even though only define-modify-macro (like incf/decf) actually is like that in the standard.
22:23:19
fwoaroof[m]
I generally think of "design patterns" as involving fairly complicated code structures that have to be manually implemented every time
22:27:09
aeth
solve the package name conflict issue in Quicklisp so you can say with-every-single-asdf-system-in-quicklisp-loaded
22:29:47
aeth
think of all of the fun surprises realized by modifying global state, e.g. you might discover that (with-every-system-loaded (+ 1 1)) => ٢
7:18:27
phoe
sure thing I would, since the original term "design pattern" attaches itself to things as petty as the Singleton and the Decorator
8:52:47
p_l
phoe: btw, have you read the original Design Patterns (I haven't, it's on The List)? I wonder how Smalltalk version matches up to the C++/Java cargo cult
9:45:43
dim
my understanding (which needs fact checking, conversations, actually reading the book, etc) is that Design Patterns are mostly useful when all you have is Single Dispatch and Single Inheritance ; when you have multiple dispatch and a way to compose methods yourself, I'm not sure you actually need many of the design patterns... you just don't have those problems they're solving...
9:47:31
beach
dim: Those are the design patters that are mostly described in the book. But that doesn't mean that those are the only useful design patterns, so there maybe others in languages that don't happen to need the ones from the book.
9:48:36
dim
(well I said only the first half, it would be more fair to say that I also agree with the other part you're adding)
9:49:43
dim
I think http://www.norvig.com/luv-slides.pdf could be understood as some kind of Lisp design patterns too
9:54:49
dim
oh ok I failed to remember that my feeling about design patterns and lisp actually come from that slide deck, thanks for the reminder ;-)
9:56:38
phoe
basically, some design patters may disappear as the underlying language becomes actually capable of supporting the concepts behind those patterns in better ways
10:18:29
ajithmk
What's the lisp way of saying var1[0] or var1[1] when var1 is pointer to an array of structs?