<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/07/421e11339985a294563f9b4fc0d5a34d"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2003-07-29T21:01:52"
  subject="Re: [Caml-list] assert caught by try with _"
  prev="2003/07/1c416b19998651a8c498d19591070818"
  next="2003/07/3f3ced666b2a7750ac278ca971c5f0bc"
  prev-in-thread="2003/07/012000871048c09c09b73acb0a767ec8"
  next-in-thread="2003/08/cc45ea5e2dc634955ab812e1d6fdacd7"
  prev-thread="2003/07/976c83213750a167f0a635b7687ffe81"
  next-thread="2003/07/ba9f7a43c963a0693df6ce5d6c7736d4"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] assert caught by try with _">
<msg 
  url="2003/07/8d067f3472c9db2843900ad04bc1ddfd"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2003-07-28T18:43:41"
  subject="[Caml-list] assert caught by try with _">
<msg 
  url="2003/07/1b6ecd32d8cb08e0e226160a88d2418f"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2003-07-28T19:08:22"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/07/da955a051fbb26778695027528f86f7b"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2003-07-29T02:37:13"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/07/012000871048c09c09b73acb0a767ec8"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-07-29T03:18:01"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/07/421e11339985a294563f9b4fc0d5a34d"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2003-07-29T21:01:52"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/08/cc45ea5e2dc634955ab812e1d6fdacd7"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2003-08-06T12:21:08"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/08/4aebd5f287a4e3d4cc44215ead37efd7"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2003-08-06T14:50:26"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/08/89bd326adba5da59a781ac6d3ad19564"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2003-08-06T17:45:16"
  subject="Re: [Caml-list] assert caught by try with _">
</msg>
</msg>
</msg>
<msg 
  url="2003/07/af414b82397383bcb6da895d2858c783"
  from="Yaron M. Minsky &lt;yminsky@c...&gt;"
  author="Yaron M. Minsky"
  date="2003-07-30T10:22:20"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/07/40d54eae7f4ed6f16eb41e07c5c59e83"
  from="james woodyatt &lt;jhw@w...&gt;"
  author="james woodyatt"
  date="2003-07-30T15:47:38"
  subject="Re: [Caml-list] assert caught by try with _">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/07/b7392a72f9fe176635fedc6a184d67e1"
  from="Jason Hickey &lt;jyh@c...&gt;"
  author="Jason Hickey"
  date="2003-07-30T05:45:03"
  subject="[Caml-list] unwind-protect">
<msg 
  url="2003/07/5ff669a9d2be35ec585b536e2e0fc7ca"
  from="Yaron M. Minsky &lt;yminsky@c...&gt;"
  author="Yaron M. Minsky"
  date="2003-07-30T10:30:23"
  subject="Re: [Caml-list] unwind-protect">
<msg 
  url="2003/07/85b8e032e5a714fc6c464715b482bb2c"
  from="Didier Remy &lt;Didier.Remy@i...&gt;"
  author="Didier Remy"
  date="2003-07-30T17:25:46"
  subject="Re: [Caml-list] unwind-protect">
<msg 
  url="2003/07/0ee85c5c688c958d4d9c57749ea69cb2"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-07-31T00:47:09"
  subject="Re: [Caml-list] unwind-protect">
</msg>
</msg>
</msg>
<msg 
  url="2003/07/bb20974642b0a6c34c428a093f2086a5"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2003-07-30T14:44:21"
  subject="Re: [Caml-list] unwind-protect">
</msg>
</msg>
<msg 
  url="2003/07/7321c1d7a6a5de7042a617ca2c897309"
  from="Jason Hickey &lt;jyh@c...&gt;"
  author="Jason Hickey"
  date="2003-07-30T05:44:09"
  subject="Re: [Caml-list] assert caught by try with _">
</msg>
</msg>
</thread>

<contents>

&gt;But you might really want to catch assert failures!
&gt;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

</contents>

</message>

