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
consumption.
cheers,
doug
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr