Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Object-oriented access bottleneck
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] Object-oriented access bottleneck
> Nicolas Cannasse wrote:
> > For most of the cases, modules should be powerful enough and offer far
> > better performances... and inlining.
> > Even if you need some specialisation, you can always handle it using a
> > closure.
>
> Could you give an example?
>
> Ben
>

For example, you have a module A with a type t which have one or more
mutable fields where you can store user given closures that will perform
some specific tasks. Theses closures can be seen has type "methods" , and if
the type is visible, you can even do some runtime subclassing.

Nicolas Cannasse

-------------------
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