Browse thread
[Caml-list] assert caught by try with _
[
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: | Chris Hecker <checker@d...> |
| Subject: | Re: [Caml-list] assert caught by try with _ |
>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. :) Chris ------------------- 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