Browse thread
[Caml-list] raise extra arg ignored
[
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: | Dave Mason <dmason@s...> |
| Subject: | Re: [Caml-list] raise extra arg ignored |
The `obvious' solution is to make raise be a statement rather than a
function. That has the added benefit of making raise a little
clearer, to wit, instead of:
; ocaml
Objective Caml version 3.02
# exception Foo of int;;
exception Foo of int
# raise Foo 42;;
Characters 6-9:
The constructor Foo expects 1 argument(s),
but is here applied to 0 argument(s)
#
raise Foo 42
could be interpreted properly (i.e. as
raise (Foo 42)
This is one of the few ways that I prefer Java syntax over ocaml syntax.
../Dave
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr