Browse thread
[Caml-list] kprintf with user formatters
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Daniel_Bünzli <daniel.buenzli@e...> |
| Subject: | lazyness in ocaml (was : [Caml-list] kprintf with user formatters) |
Le 21 juil. 04, à 17:52, Pierre Weis a écrit : > The drawback is that you would have to write (lazy expr) > for each argument ``expr'' to be printed. Quite a bit intrusive, I > think. I agree. I once tried to port some haskell combinators [1] to ocaml. However I had to stop since using them meant cluttering your code with (lazy e) and lead to unreadable code. 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)). Alternatively something less intrusive than the keyword 'lazy' would be good. Daniel [1] <http://doi.acm.org/10.1145/944705.944727> ------------------- 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