From: "Yaron M. Minsky" <yminsky@cs.cornell.edu>
To: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] assert caught by try with _
Date: 30 Jul 2003 06:22:16 -0400 [thread overview]
Message-ID: <1059560536.25904.1451.camel@dragonfly.localdomain> (raw)
In-Reply-To: <4.3.2.7.2.20030729113455.02401e98@localhost>
On Tue, 2003-07-29 at 17:01, Chris Hecker wrote:
> >But you might really want to catch assert failures!
> >For instance if you're building a debugging tool.
>
> Okay, but it seems like a compile time switch would serve both
> interests. Plus, it seems like the "assert should blow up" usage would be
> far more common, since the number of people writing non-debugging-tool code
> is far larger than the number writing debugging tool code.
>
> Another way of thinking about this is that almost everybody re-#defines
> assert in production C/C++ programs to do their own assert handling during
> development (whether it's printing out additional information, allowing you
> to drop into the debugger, popping up a message box, sending bug email,
> whatever). With assert hard-coded into ocaml, you can't do this. I could
> use a different function than assert, but then it won't compile out,
> etc. I could use camlp4 to make my own assert, but then I take a
> compilation speed hit on all my files, etc.
>
> Anyway, it sounds like this behavior isn't surprising to anybody else, so
> I'll add it to the list of things that only I think are broken about ocaml. :)
Not so fast. I have hit the same issue and entirely agree. In general,
the issue of making sure that an exception escapes when you want it to
is a bit of a problem, and it would be nice to have some way of dealing
with this, and not just with asserts. But certainly asserts should have
the option for the kind of always-die behavior you're talking about.
y
--
|--------/ Yaron M. Minsky \--------|
|--------\ http://www.cs.cornell.edu/home/yminsky/ /--------|
Open PGP --- KeyID B1FFD916 (new key as of Dec 4th)
Fingerprint: 5BF6 83E1 0CE3 1043 95D8 F8D5 9F12 B3A9 B1FF D916
-------------------
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
next prev parent reply other threads:[~2003-07-30 10:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-28 18:34 Chris Hecker
2003-07-28 19:08 ` Nicolas Cannasse
2003-07-29 2:37 ` Chris Hecker
2003-07-29 3:17 ` Jacques Garrigue
2003-07-29 21:01 ` Chris Hecker
2003-07-30 10:22 ` Yaron M. Minsky [this message]
2003-07-30 15:47 ` james woodyatt
2003-08-06 12:19 ` Michal Moskal
2003-08-06 14:50 ` William Lovas
2003-08-06 17:44 ` Michal Moskal
2003-07-30 5:44 ` Jason Hickey
2003-07-30 5:44 ` [Caml-list] unwind-protect Jason Hickey
2003-07-30 10:30 ` Yaron M. Minsky
2003-07-30 17:29 ` Didier Remy
2003-07-31 0:47 ` Jacques Garrigue
2003-07-30 14:44 ` William Lovas
2003-07-29 22:55 [Caml-list] assert caught by try with _ Martin Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1059560536.25904.1451.camel@dragonfly.localdomain \
--to=yminsky@cs.cornell.edu \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox