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] kprintf with user formatters
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-07-22 (17:03)
From: William Lovas <wlovas@s...>
Subject: Re: lazyness in ocaml (was : [Caml-list] kprintf with user formatters)
On Thu, Jul 22, 2004 at 06:28:51PM +0200, Pierre Weis wrote:
> > A more lightweight notation would be needed in order to do real lazy 
> > programming in ocaml. At that time I wondered if specifiying the 
> > lazyness when one defines the function and not when one uses it would 
> > be a problem (I mean a technical problem, not an ideological one).
> > For example if one defines
> > 
> > let f (lazy x) = ...
> > 
> > then the application f (x + y) would implicitely mean f (lazy (x + y)). 
> [...]
> This has to be precisely ruled out and the necessary proofs have to be
> made, but I think it could work (including for higher-order
> functional, map, fold, and so on). I mean, I don't see any trivial
> counter-example that would ruin this scheme. Wao! If this rule
> turned out to be usable, it would be a major improvement for lazy
> evaluation in our favorite language.

This is reminiscent of the notation in Wadler's paper, "How to add laziness
to a strict language, without even being odd"[1].  He even gives the
semantics as a translation into the delay/force ("odd") style already
supported in O'Caml, similar to this proposal.  Perhaps it could even be
implemented in camlp4, without any need for type-based transformations.



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