Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: pad@r...
Subject: Re: [Caml-list] OCaml and Design Patterns
Vasili Galchin <vasiliocaml@yahoo.com> 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 :
 http://www.norvig.com/design-patterns/


> 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:
 http://caml.inria.fr/ocaml/htmlman/manual007.html
 (section 5.3)

Hope it helps.


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

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners