-4

It seems that design patterns are actually linked to some C++ or Java object models (e.g. they might not fit to Ocaml objects, or to Common Lisp Object System). Or at least tied to a specific programming language (e.g. Common Lisp and C probably have different design patterns?) or some application (e.g. Elephant in Common Lisp).

Are design patterns different of coding rules? (e.g. MISRA-C)

It seems that design patterns make no sense in functional languages (e.g. a book on Haskell don't even mention them).

It seems that compilers like GCC or Ocaml don't follow design patterns. Of course, they do share a lot of concepts (abstract syntax trees, front-end/middle-end/back-end).

It seems that the Linux kernel follows some design patterns.

It seems that large open source systems (e.g. PostGreSQL or the Linux kernel) don't even claim to follow (all, or most) design patterns.

For what kind of software are design patterns useful? Example in open source projects are welcome!

Are there any software tools enhancing/verifying design patterns (preferably open source tools that I could test on a Linux desktop)?

Should an expert system shell project (like RefPerSys) define design patterns? ClipsRules don't seem to mention them.

It seems that operating system kernels don't follow all the same design patterns.... (there are large differences between Linux and FreeBSD, even if many concepts - drivers, processes, ... are similar).

NB. Ocaml and JavaScript seems on the opposite sides of design patterns.... Ocaml favoring strict compile-time typing, JavaScript favoring dynamic runtime typing.

Foster's book on designing and building parallel programs don't mention design patterns.

Sejnowski's book on the Deep Learning Revolution don't mention design patterns.

Zellers' book on why programs fail is the only book that mention design patterns

Fowler's book on domain specific languages mention design patterns different of other books.

10
  • Why the downvote? Dec 11, 2021 at 14:49
  • 4
    Design Patterns are names for known-working solutions to recurring problems. What makes you think there are no recurring problems in Haskell or that there are no known good solutions to problems in Haskell? E.g. I would argue that "monad transformer stack" is a Haskell design pattern. Dec 11, 2021 at 14:51
  • Because the book I have about Haskell (ISBN 0-201-34275-8) don't even mention design patterns.... I also saw no mention of design patterns in GCC (to which I did contribute in the past) or its mailing lists. I also saw no design patterns inside the source code of Ocaml Dec 11, 2021 at 14:52
  • 2
    GCC is older than the term design pattern, but the fact that when GCC was designed, the term had not yet been coined does not necessarily mean that there are no recurring problems with good solutions. For example, I would consider "Shared Intermediate Language" to be a Compiler Design Pattern for solving the m×n problem of languages×platforms, and that Pattern is certainly used in GCC and much more aggressively in LLVM. Dec 11, 2021 at 15:02
  • 5
    Basile, your questions are always fascinating but meandering. Here, you link to so much stuff that is irrelevant for your main question (design patterns in functional languages). Of course a book about deep learning won't discuss software design patterns. I feel like even just the Wikipedia article would have provided helpful orientation. “Design patterns” are also connected to the 90s OOP hype, so it should be understandable that non-OOP and non-90s era languages are not frequently viewed through the patterns lense.
    – amon
    Dec 11, 2021 at 21:38

1 Answer 1

2

From a simplistic view one might consider that although the term design patterns is not mentioned it cannot not to exist in software development since its definition, see Software design pattern Wikipedia page, is:

In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design.

Thinking in terms of human behaviour reflexes being developed by commonly occurring problems could it be that they are design patterns?

Psychologically too one could talk about design patterns entitled by the filed's studies, see Einstellung effect just to mention one.

What I'm trying to say is that various terms refer to one common way of responding to repeated situations, I think.

Not the answer you're looking for? Browse other questions tagged or ask your own question.