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 ocaml.org.

Browse thread
Base class "constructor" being called multiple times?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: james woodyatt <jhw@w...>
Subject: Re: "ocaml_beginners"::[] Base class "constructor" being called multiple times?
On Tuesday, Jul 22, 2003, at 08:48 US/Pacific, Richard Jones wrote:
> But is there a way to write the add method without the closure?
>
> I tried various things like:
> [...]
> but all give syntax errors.

Not with this particular method, but don't panic. It wouldn't make any 
difference in the bytecode (or native). Every method is basically a 
closure member that gets dispatched with some magic. Explicitly 
writing it as a function may look funky, but it gets compiled basically 
the same as if you don't.


-- 
j h woodyatt <jhw@w...>
that's my village calling... no doubt, they want their idiot back.