Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail From: Sebastian Newsgroups: comp.lang.java.programmer Subject: OO Design Patterns vs FP Date: Wed, 02 Oct 2013 09:33:50 +0200 Organization: albasani.net Lines: 15 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net 4zjh3bg7Q92qMyrVXUxs7bPv/dGZilzJCOCKJPbiJKxhSVCBDysqpQ2t4vrgygMyC2MCO1ITpkIPlPZyfCPcGA== NNTP-Posting-Date: Wed, 2 Oct 2013 07:33:03 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="2T8A1xpMpqrJxmbxlyGtfUVpIZr+L4s8ec7b9P23VC/mLkftm34x5qUIc1diirPYERR3TLDyfmYSjBIwvFmbBGW+AbdPMxkGEvN8owRs4EpeFSIG9ZyTxZFFuHwVPR5i"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 Cancel-Lock: sha1:RuTVlv8GGgt+bHEiHlYySja/fR0= Xref: csiph.com comp.lang.java.programmer:25427 Hello there, has anyone written about the relation of OO design patterns (by which I mean the usual GoF patterns) to functional programming idioms? For example, it seems obvious that Decorator (and Chain of Responsibility and Adapter, too) are forms of functional composition. But other patterns are less obvious. Visitor might be fold, but you'd have to throw in the polymorphism, etc. The reason I ask, of course, is lambdas in Java 8. I think it's possible that ideas from FP may inform our approach to design patterns in current OO languages. -- Sebastian