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 (18:15)
From: Karl Zilles <zilles@1...>
Subject: Re: [Caml-list] OCaml compared as a scripting language
John Goerzen wrote:
> 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;


> print FD "$theint\n";

Wow!  That's 4 extra characters!

I've ported several thousand-line perl scripts to OCaml.  My experience 
is that the resulting scripts are about the same size as the original 
scripts.  They're just infinitely easier to maintain.

There is a lot of syntactic sugar in perl (especially for i/o) that 
makes simple programs very small.  As the program grows more complex, 
the benefits are fewer.

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