caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Karl Zilles <zilles@1969.ws>
To: John Goerzen <jgoerzen@complete.org>
Cc: Richard Jones <rich@annexia.org>, caml-list@inria.fr
Subject: Re: [Caml-list] OCaml compared as a scripting language
Date: Tue, 15 Jun 2004 11:16:44 -0700	[thread overview]
Message-ID: <40CF3D0C.6060805@1969.ws> (raw)
In-Reply-To: <20040615173513.GB13863@complete.org>

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;

vs.

> 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


  reply	other threads:[~2004-06-15 18:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-14  9:52 Richard Jones
2004-06-14 15:55 ` Brian Hurt
2004-06-14 16:29   ` Richard Jones
2004-06-15  6:40     ` Florian Hars
2004-06-15 16:13       ` Bruno.Verlyck
2004-06-15 17:15         ` Richard Jones
2004-06-15 17:35           ` John Goerzen
2004-06-15 18:16             ` Karl Zilles [this message]
2004-06-15 19:23               ` John Goerzen
2004-06-15 21:17                 ` Alex Baretta
2004-06-16  2:12             ` skaller
2004-06-15 17:41           ` Jon Harrop
2004-06-15 17:42           ` William D. Neumann
2004-06-15 18:27 Hellflame
2004-06-15 20:07 ` Brian Hurt
2004-06-16  2:26   ` skaller
2004-06-16 11:00   ` sejourne kevin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40CF3D0C.6060805@1969.ws \
    --to=zilles@1969.ws \
    --cc=caml-list@inria.fr \
    --cc=jgoerzen@complete.org \
    --cc=rich@annexia.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).