From: Marc Hamann <marc@hamann.ca>
To: caml-list@inria.fr
Subject: Re:Tail Calls
Date: Tue, 15 Mar 2005 20:39:05 -0500 [thread overview]
Message-ID: <5.2.0.9.2.20050315203859.02a28190@mail.berlove.com> (raw)
>I don't understand why the compiler don't do himself those transformations.
>Why is it so hard to take a non-tail-recursive-function and make it a
>tail-recursive-one ?
Because in the general case that would change the intent of the program.
Imagine if you have a sequence of two expressions with side-effects, or
with significant order (e.g. consing a value to a function that returns a
list). Changing the order automatically would have the wrong effect.
Boy, some people want computers to do ALL our thinking. ;-)
Marc
reply other threads:[~2005-03-16 1:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5.2.0.9.2.20050315203859.02a28190@mail.berlove.com \
--to=marc@hamann.ca \
--cc=caml-list@inria.fr \
/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