Thank you for your answers.
I am actually in the case of a webserver where I need to avoid interrupting
it, even in 'exceptional' cases, but rather report the problem in a log,
and return a default value whenever it is possible. Options seem to be the
best choice, not only from a safety point of vi
The 6th International Symposium on Intelligent Distributed Computing
IDC 2012
http://idc2012.deis.unical.it
September 24-26, 2012
Calabria, Italy
Le jeudi 05 avril 2012 07:57:45, Anthony Tavener a écrit :
> I'm trying to determine the size of a Bigarray, in bytes.
>
> I've tried several things... ending up with this as the only solution:
>
> --
> let ba_char = Hashtbl.hash Bigarray.char;;
> let ba_int8_signed = Hash
Ah, yeah. That was an alternative I was considering, though I wasn't sure
how to get the size of nativeint -- now I see: sizeof(value)! :)
Still not the ideal, but probably a little nicer than using 'hash' to
reveal abstracted values. ;)
BTW, thank-you Florent, for your articles on interfacing wi
[Please apologize multiple copies and crossposting.]
Dear colleagues,
we would like to invite you to submit a paper to
WCB12 - Workshop on Constraint Based Methods for Bioinformatics 2012
September, 8th, 2012
Budapest, Hungary
Le jeudi, 5 avril 2012 à 11:05, Goswin von Brederlow a écrit :
> If you are writing a module then consider providing both flavours for
> functions, one with exceptions and one with options. Even if you only do
> something like this:
I don't think it's a rule that should be applied consistently, I
Pierre Chopin writes:
> Hi,
>
> I benchmarked two programs, in one case the main function throw an exception
> that is caught, in the other the function returns an option that is pattern
> matched on.
>
> I noticed that, whether the exception is thrown or not, the option version is
> always faste
That post is against maybe (aka option) as an error type as it looses
information about the error. If you use an Either type such as Core's
Result.t that argument is invalidated.
In fact at Jane Street we try avoid the use of exceptions as they don't
force the client of the library to handle the