Object Functional Patterns
describe ways to adapt features and strategies usually found in
s for use in
. Some of these are
s, but many are not.
first brought these concepts to Wiki with his
and many patterns in this language originate from his PhD thesis which is a book by the same name.
shows how to treat functions as first class objects. This is useful for implementing
s in an
describe how to implement
-- features normally found only in
s. These mechanisms allow us to make verb based abstractions in addition to the noun based abstractions that
languages give us. When objects are used in these abstractions they become passive rather than active which gives us a wider range of expression.
that describes how to treat the stack frame of a function call as a first class object it is very closely related to
s can be made to work then
can be used in an OO environment and can potentially reduce or eliminate the need for threads.
Programs can be made more efficient by delaying computations using
and caching the results (see
s are one way of doing this.
has its problems though. In an world where state is mutable
can be used to protect against aliasing and side-effects.
can make code easier to read and write.
s enable their use, but they do have some limitations especially when it comes to flexibility. The
shows how to
in order to simultaneously iterate over multiple collections.
extends the concept of
to objects and more importantly aggregates of objects. So that these aggregates can be used in new contexts without having to be re-opened and extended.
You can get a complete list of these patterns by going to
and clicking on the title.
I wonder if
has any details that are missed on the
page. Similarly I wonder if there is any difference between his VoidValue
and our more familiar
View edit of
April 5, 2010
with title or text search