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] raise extra arg ignored
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-10-31 (17:10)
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.

Bug reports:  FAQ:
To unsubscribe, mail  Archives: