Not_found and Failure _ can be a bit annoying to watch for, so I suggest using Core. The default behavior for most functions is to return an option instead of raising an exception. There are _exn versions of the functions if you want exceptions.
On Fri, May 09, 2008 at 01:39:54AM +0100, Jon Harrop wrote:
>
> Brian Hurt recently published the following blog post "Why OCaml sucks":yeah, a new troll post (!)
>
> http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/
>
> I think it is interesting to discuss which aspects of OCaml can be improved
> upon and how but I disagree with some of his points. I'll address each of the
> original points in turn:
no it's not. it's in your fantasy world. lots of applications doesn't
> 1. Lack of Parallelism: Yes, this is already a complete show stopper.
(or marginally) benefits from parallelism, and that your specific turf
would benefit from them, is not a good reason to impose their drawbacks
on everybody else.
unicode string should not be the default string, but unicode string need
> 5. Strings: pushing unicode throughout a general purpose language is a
> mistake, IMHO. This is why languages like Java and C# are so slow.
to be available as a first class citizen. again, ocaml is not about doing
raytracer in opengl only.
exception traces are *not* available in long running program (daemon).
> 7. Not_found: I like this, and Exit and Invalid_argument. Brian's point that
> the name of this exception does not convey its source is fallacious: that's
> what exception traces are for.
and having a Not_found crippling somewhere is just plain annoying.
even having something like a List.Not_found/Hashtbl.Not_found would make
thing a bit easier.
exceptions are for exceptional circumstances. using them as a fancy goto
> 8. Exceptions: I love OCaml's extremely fast exception handling (6x faster
> than C++, 30x faster than Java and 600x faster than C#/F#!). I hate
> the "exceptions are for exceptional circumstances" line promoted by the
> advocates of any language implementation with cripplingly-slow exception
> handlers.
mechanism is just plain stupid and really bad programming style.
have you been hiding in a cave lately ?
> 9. Deforestation: Brian says "Haskell has introduced a very interesting and
> (to my knowledge) unique layer of optimization, called deforrestation". True,
> of course, but useless theoretical piffle because we know that Haskell is
> slow in practice and prohibitively difficult to optimize to-boot. Deforesting
> is really easy to do by hand.
haskell has improve its performance lately; not on everything, but still
can beat ocaml on some micro benchmarks.
> . No 16Mb limit.
> I have other wish-list items of my own to add:
>
use 64 bits.
--
Vincent
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs