Browse thread
Misunderstandings about the AST
-
Loup Vaillant
-
Nicolas Pouillard
- Loup Vaillant
- Jeremy Yallop
-
Nicolas Pouillard
[
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: | Loup Vaillant <loup.vaillant@g...> |
| Subject: | Re: [Caml-list] Misunderstandings about the AST |
Thank you for your help, I will get back to work. 2007/3/27, Nicolas Pouillard <nicolas.pouillard@gmail.com>: > On 3/27/07, Loup Vaillant <loup.vaillant@gmail.com> wrote: > > | Pexp_lazy of expression > > Why does this constructor even exist? Are some specific optimizations made? > > Since the evaluation of the expression is delayed it's not a plain function. Actually, I knew that. However, given the following expressions are semantically equivalent: lazy expr;; lazy_from_fun (fun () -> expr);; With "lazy_from_fun" being a plain function, my point is then to know if they are really equivalent (e.g. implementation wise), so I can assume the keyword "lazy" is just syntactic sugar. Loup PS: Nicolas, Sorry for the double post, I messed up the "reply" button.