Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] error messages to stdout?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-01-17 (18:03)
From: Doug Bagley <doug@b...>
Subject: Re: [Caml-list] error messages to stdout?
Remi VANICAT wrote:
> you should compile your program to (at least) bytecode code. It will
> be faster, and those kind of error will only exist at compile time,
> not at execution time...

Well, I certainly could do that, but I was hoping to use Ocaml to
replace my bash/awk/sed/perl scripts. For me, the convenience of
having one single source file, and no compilation step, is one of the
attractions of "scripts". As far as I can tell, the extra load time
due to compilation of the script is negligible, and I assume the
run-time is equivalent to a pre-compiled byte-code executable? I have
many scripts that do filtering, so having a clean output stream is
important to me.  It seems to me that if the ability to use a custom
toplevel as a script interpreter exists, then it would be very nice if
it printed all diagnostics to stderr.

Anyway, I have a workaround, I wrote a "trampoline" program that can
be used in place of the toplevel interpreter and does the compilation
transparently for lazy persons such as myself.

It essentially turns any compiled language into a scripting language.
If anyone is interested in it ... I could clean it up for public

Bug reports:  FAQ:
To unsubscribe, mail  Archives: