Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] OCaml and Design Patterns
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-10-21 (08:51)
From: pad@r...
Subject: Re: [Caml-list] OCaml and Design Patterns
Vasili Galchin <> writes:

> Hello,
>      I am working on a C++ project (hey I have to make money ... I
>      personally hate the language) so I am using Design Patterns. In
>      the standard GoF book (Gang of Four design pattern book), the
>      authors say that some patterns already exist (builtin) in some
>      languages. 

yes, have a look at :

> What design patterns do you think would be useful if
>      I am using the OO features of OCaml (i.e. non-pure functional
>      features)?

I don't really understand the question because in theory all the design pattern are useful.
So abstract factory can be useful in O'Caml too.
Stragegy is useful too but easier in O'Caml since higher order function allow
to encode easily the strategy pattern.
There is discussion in the O'Caml manual about the observer pattern at:
 (section 5.3)

Hope it helps.

> Thanks, vasili
> ---------------------------------
> Do you Yahoo!?
> - Register online to vote today!

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: