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
[Caml-list] OCaml compared as a scripting language
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-15 (17:34)
From: John Goerzen <jgoerzen@c...>
Subject: Re: [Caml-list] OCaml compared as a scripting language
On Tue, Jun 15, 2004 at 06:15:35PM +0100, Richard Jones wrote:
> On Tue, Jun 15, 2004 at 06:13:23PM +0200, Bruno.Verlyck@inria.fr wrote:
> > Anyway, all those language comparisons are always biased; is `program
> > length' a good measure of scripting capacity ?  It turns the
> > comparison into a shortest script challenge, doesn't it ?
> Actually it's not a bad measure.  One of the reasons I prefer Perl
> over Java, and OCaml over Perl, is verbosity.  On a scale of length of
> programs:
> OCaml < Perl <<<<<<< Java
> In fact I don't think I've ever seen anything as horribly verbose (and
> useless) as Java.  COBOL perhaps?

My experience has been that OCaml is a lot more verbose than Perl.  For
instance, to output an integer to a file, I'd have to do:

fprintf fd "%d\n" theint;


output_string fd ((string_of_int theint) ^ "\n");

print theint

print FD "$theint\n";

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners