Browse thread
[Caml-list] baffled by semicolon
[
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: | William Lovas <wlovas@s...> |
| Subject: | Re: [Caml-list] baffled by semicolon |
On Wed, Aug 25, 2004 at 10:05:49PM -0700, briand@aracnet.com wrote: > [...] > However your response woke up some neurons - why wouldn't it be : > > let w = (area#misc#realize ()); area#misc#window ;; ... and the easy way to remember the reason it parses this way is to recall that O'Caml is a *function*al language, so *function* application binds most tightly. :) So in ``area#misc#realize (); area#mist#window'', the application of ``area#misc#realize'' -- and not the `;' -- gets the (). It's the same as with things like ``f x + g 3'' (= ``(f x) + (g 3)'', not ``f (x + g) 3'', or any other weird thing like that). Hope this helps. cheers, William ------------------- 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