-2

C++ and Java have a lot of design patterns to follow. Do lisp or scheme like languages have similar concepts?

Many design patterns used by C++/Java are related to OOP. lisp has CLOS, so I guess we can following C++ design pattern for CLOS.

But, in lisp, we can also write code with functions, and use dynamic features (for example eval). Do we have any design patterns for them?

Joe C
  • 2,757
  • 2
  • 26
  • 46
  • 1
    Lisp, as in CL, isn't functional but multi paradigm. OOP works through CLOS. I imagine lots of patterns are language agnostic so Yes! You should perhaps edit your question to make it more to the point as I find this question a tad vague. – Sylwester Jul 17 '16 at 23:03
  • @Sylwester My questions are about design patterns when using functions or other runtime features (dynamic type check, eval, ...). I updated my question, and also added design-pattern as a tag. – Joe C Jul 17 '16 at 23:11
  • 1
    asked before: http://stackoverflow.com/questions/127377/programming-languages-and-design-patterns – Rainer Joswig Jul 18 '16 at 07:13
  • 1
    asked before: http://stackoverflow.com/questions/327955/does-functional-programming-replace-gof-design-patterns – Rainer Joswig Jul 18 '16 at 07:14
  • 1
    simila: http://programmers.stackexchange.com/questions/157943/are-there-any-design-patterns-that-are-unnecessary-in-dynamic-languages-like-pyt – Rainer Joswig Jul 18 '16 at 07:15
  • 1
    similar: http://programmers.stackexchange.com/questions/89273/where-are-all-the-functional-programming-design-patterns – Rainer Joswig Jul 18 '16 at 07:16

1 Answers1

4

Design patterns are more or less language agnostic and more like an algorithm. There are patterns in lisp style languages as well and if they are frequent enough they might warrant a macro to reduce boilerplate.

In the Wikipedia page about design patterns it is mentioned that Peter Norvig demonstrates that 16 out of the 23 patterns in the Design Patterns book (which is primarily focused on C++) are simplified or eliminated (via direct language support) in Lisp or Dylan.

Perhaps reading his paper will shed more light on the subject.

Sylwester
  • 47,942
  • 4
  • 47
  • 79