English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 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