4 ms·
What exactly is meant by the line "Design patterns disappear as you adapt the language to your problem domain." The word "disappear" is a hyperlink to a pdf, w
by pure-awesome 8y ago
What exactly is meant by the line "Design patterns disappear as you adapt the language to your problem domain."
The word "disappear" is a hyperlink to a pdf, which refers to domain-specific design-patterns. I don't quite seem to grasp what is being implied on the home-page.
Is it something like Lisp is very customizable and allows you to easily overload operators? (I am primarily a Java programmer and have never used Lisp).
EDIT: I mean, e.g. this page asks "Are Design Patterns Missing Language Features" http://wiki.c2.com/?AreDesignPatternsMissingLanguageFeatures http://wiki.c2.com/?AreDesignPatternsMissingLanguageFeatures
Is this what's being referred to, and if so, what makes Lisp especially good for adding language features?
- giancarlostoro 8y agoIndeed Lisps claim to fame is how much the language itself is extensible. Something along the lines of "you rewrite the language / expand it" for whatever project you're working on. Writing your own lisp interpreter is another popular type of project people do as well given how simple Lisps syntax is to parse and follow. If you are interested in Lisp on the JVM check out Clojure.
- JaumeGreen 8y agoLisp macros are what make lisp extensible. They make it extensible in a way that make it indistinguishable from language features. The best simple explanatin I found for macros is this one [0]. In a rough sumary: you could add to lisp any "missing" functionality -present in another language- with just macros (without altering the compiler/interpreter), and this functionality would work as if it was in the compiler/interpreter from the beginning. [0] http://www.gigamonkeys.com/book/macros-defining-your-own.html http://www.gigamonkeys.com/book/macros-defining-your-own.htm...
- SomeHacker44 8y agoRemember that Common Lisp, at least, has many different types of macros. The most common are ordinary s-expression macros (macros that look like s-expressions and output an s-expression at compile time). However, there are also symbol macros and reader macros as well, each of which are used to make Common Lisp massively extensible and an amazingly expressive language.
- montrose 8y agoThe short version is that many "design patterns" are de facto macroexpansions. So if you write the corresponding macro, you don't need the pattern any more.
- pavelludiq 8y agoYes, basically Lisp gives you the tools to automate the process of implementing patterns. You implement the pattern once and then you just reuse the implementation the way you would ordinary logic in normal programming languages.
- darkhorn 8y agoSome of the problems in imperative languages are solved with design patterns. You don't have these problems if you use Lisp.
- kqr 8y agoIf it is indeed true that you are primarily a Java dev who has never used Lisp, I am impressed by how well you managed to ask a question in an area where you must have very little familiarity.