caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: brogoff <brogoff@speakeasy.net>
To: Thomas Fischbacher <Thomas.Fischbacher@Physik.Uni-Muenchen.DE>
Cc: Jon Harrop <jon@ffconsultancy.com>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] lisp to ocaml
Date: Sun, 18 Sep 2005 10:10:22 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0509180959500.22361@shell2.speakeasy.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0509181756060.1141@eiger.cip.physik.uni-muenchen.de>

On Sun, 18 Sep 2005, Thomas Fischbacher wrote:
> On Sun, 18 Sep 2005, Jon Harrop wrote:
>
> > > You cannot directly compile LISP code to ML code in the sense that
> > > (...)
> > > for a ton of reasons.
>
> > In this case, what else is needed beyond replacing operators with those
> > suitable for a generalised numeric type and constructing numeric literals?
>
> I have to correct my statement:
>
> You cannot compile Common Lisp code to ML code that expresses the same
> idea short of piping it through an intelligent human who is proficient
> with both languages, and can use intelligent judgment to make decisions
> about what "the same idea" is supposed to mean.

That's not surprising, considering that if you substitute SML for Common Lisp
and OCaml for ML, the statement remains true, even though the differences
between languages is far less.

I can't claim to be intelligent, but I'm at least human, and I've done the
experiment.

I translated some small (about 5_000 LOC) programs from SML to OCaml a few
years ago, and while at first I wanted to use CamlP4, in the end I just rolled
up my sleeves and used Andreas Rossberg's side by side table of differences
to refresh my rusty SML. I imagine any nontrivial Lisp code would be harder.
Some Schemes may be easier than Lisp, since there are dialects of Scheme that
are very ML influenced with modules, exceptions, and pattern matching.

-- Brian



  reply	other threads:[~2005-09-18 17:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-18  1:08 Jonathan Roewen
2005-09-18  2:56 ` Jon Harrop
2005-09-18 14:06 ` Thomas Fischbacher
2005-09-18 14:17   ` yoann padioleau
2005-09-18 14:37     ` Thomas Fischbacher
2005-09-18 15:44   ` Jon Harrop
2005-09-18 16:08     ` Thomas Fischbacher
2005-09-18 17:10       ` brogoff [this message]
2005-09-19 13:08 ` Christoph Bauer

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=Pine.LNX.4.58.0509180959500.22361@shell2.speakeasy.net \
    --to=brogoff@speakeasy.net \
    --cc=Thomas.Fischbacher@Physik.Uni-Muenchen.DE \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@ffconsultancy.com \
    /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).