Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: John Harrison <jharriso@ra.abo.fi>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: jharriso@ra.abo.fi (John Harrison), caml-list@pauillac.inria.fr
Subject: Re: CAML Light system functions etc.
Date: Mon, 20 Nov 1995 14:04:13 +0200	[thread overview]
Message-ID: <199511201204.OAA20531@tanichka.abo.fi> (raw)
In-Reply-To: Your message of "Mon, 20 Nov 1995 11:16:47 EET." <199511201016.LAA07901@pauillac.inria.fr>



| > (1) Is there an interface to "tempnam" or something similar? (For creating
| > unique temporary filenames). I looked in the "unix" library but couldn't
| > find anything -- I think it'd be a convenient addition.
|
| It is a SMOP (Small Matter Of Programming). Here is the function I use:

Yes, I ended up doing something using the PID. But then most library
functions are a SMOP; it still seems reasonable to provide the ones that
users are going to need. At least you and I needed this one.

| > it's neither pleasant nor efficient to always have to worry
| > about signal exceptions popping up.
|
| Shall I read this as ``I use (try ... with _ -> ...) all the time because
| I'm too sloppy to figure out exactly which exceptions I should trap'' ?
| That's a dangerous thing to do, since any heap allocation can trigger
| the Out_of_memory exception.

That's an all-too-accurate reading! Except that I could perfectly well have
a common exception "MYERR" and just use "try ... with MYERR(_) -> ...". I
wouldn't object to the extra typing, but I guess it would be significantly
less efficient. Is that true? I suppose I could try it and find out.

| > (3) Is there some hook to allow a user-defined function to be called after
| > the evaluation and printing of each toplevel phrase? This would be nice for
| > reporting run statistics etc.
|
| No, there isn't.

Well, since you excel at reading between the lines, you can read my question
as "what a great idea it would be to add some hook... wouldn't it?" My guess
is that it would be easy for a CAML-Light expert to add, since the
interpreter's read-eval-print loop itself seems to be written in CAML.

Cheers,

John.




      reply	other threads:[~1995-11-20 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-19 15:52 John Harrison
1995-11-20 10:16 ` Xavier Leroy
1995-11-20 12:04   ` John Harrison [this message]

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=199511201204.OAA20531@tanichka.abo.fi \
    --to=jharriso@ra.abo.fi \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@pauillac.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