English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: Why OCaml sucks
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-05-09 (07:56)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] Re: Why OCaml rocks
On Fri, 2008-05-09 at 01:39 +0100, Jon Harrop wrote:
> 1. Lack of Parallelism: Yes, this is already a complete show stopper. 

> 2. Printf: I think 
> printf is one of the reasons OCaml dominates over languages like Haskell and 
> SML. 
I'm not sure about "dominate", but yes, it's definitely one reason why I
code in OCaml rather than Haskell.

> 5. Strings: pushing unicode throughout a general purpose language is a 
> mistake, IMHO. This is why languages like Java and C# are so slow.
We have a good Unicode library (see Camomile), good ropes libraries (see Community Caml)
and someone is bound to write a syntax extension to provide a natural syntax for Rope
literal constants.

> 6. Shift-reduce conflicts: although there as aspects of OCaml's syntax that I 
> would like to tweak (e.g. adding an optional "end" after a "match" 
> or "function" to make them easier to nest), I am not bother about the 
> shift-reduce conflicts. Mainstream languages get by with far more serious 
> syntactic issues (like <<...>> in C++).
That's something we may need to discuss at some point. I would really like the ability to write
match a with
( | bla
  | bla
  | bla )

> 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.
I personally prefer ExtLib's approach of redefining exceptions per-module.

> 8. Exceptions: I love OCaml's extremely fast exception handling (6x faster 
> than C++, 30x faster than Java and 600x faster than C#/F#!).

> 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.
Are you sure or is that just a troll ? Supero seems to improve enormously Haskell's performances
and the Shootout already shows Haskell beating OCaml in several tests.

> 10. Limited standard library: I agree but this is only an issue because we are 
> not able to fix the problem by contributing to the OCaml distribution.
That's the whole idea of Community Caml / Batteries Included. Really, feel free to contribute.

> . Pattern matching over lazy values.
Have you looked at the Patterns project on Google ? It provides pattern-matching 
over lazy values. I've used it in conjunction with my own lazy list module [1]
to port Graham Hutton's Countdown problem from Haskell, and it works.

> I believe these can be fixed by creating a new open source functional language 
> for Linux based upon LLVM. However, the lack of a suitable GC is a complete 
> show stopper. The JVM is the only thing that comes close and it is unable to 
> support tail calls without a catastrophic performance cost, i.e. so bad that 
> you might as well write an interpreter.

Why a full new language ? I may understand the interest of writing a new
compiler for OCaml (or whichever other language) and gradually improving
the forked compiler, but that's a different story altogether.


[1] https://forge.ocamlcore.org/frs/shownotes.php?release_id=12 
David Teller
 Security of Distributed Systems
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations.