Xah Lee wrote: > As part of this new syntax and purity, where everything in a program > is of Classes and Objects and Methods, many complex issues and concept > have arisen in OOP from both the OOP language machinery as well as a > engineering practice.
I think the fact that many design patterns from OOP are redundant in the presence of functional programming is very interesting. I'd like to see more written about this, not least because it would serve as an excellent introduction to functional programming for the majority of programmers who are versed only in object orientation (primarily C++, Java and C# programmers). There is an old paper on the GOF's OOP design patterns implemented in OCaml but it was not written by OCaml-savvy programmers and contained many errors and omissions. Perhaps the Lisp community have generated something better? Also, pattern matching is fundamental to many modern functional programming languages. Here, pattern matching is often the only way to manipulate concrete data structures and often results in code that is both faster and more concise than any object-oriented equivalent. I recently gave the example of a small symbolic simplifier written in OCaml/F# that is difficult and tedious to translate into many other languages efficiently (including C++, Java, C# and even Lisp). -- Dr Jon D Harrop, Flying Frog Consultancy OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/index.html?usenet -- http://mail.python.org/mailman/listinfo/python-list