caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Warning on not-tail recursive functions
Date: Sat,  4 Aug 2007 21:24:07 +0200	[thread overview]
Message-ID: <1186255447.46b4d25719255@webmail.in-berlin.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0708041051240.9657@localhost>

Zitat von Brian Hurt <bhurt@spnz.org>:

>
>
> On Sat, 4 Aug 2007, Oliver Bandel wrote:
>
> > What ist with a
> >
> >  ...
> >   ignore (maybe_tailcall())
> >  ...
> >
>
> That is not a tail call.  You're using the value it returns.

Yes, but ignore ignores the value,
and my question was regarded to THIS CERTAIn aspect:
if it INTERNALLY would mean that the arguments will not be created,
then nothing must be given back and if no further commands are
following (read the "..." under the ignore-call as the next
pattern of a pattern match, not as a command that follows the ignore(..)).




>
> Brian
>
> > Does ignore REALLY ignore the values (does not generate them), so that
> > this call is like a true tail-call, or will the maybe_tailcall
> > generate and give back results to the ignore-call and then
> > ignore throws away the stuff (then it would be NO tailcall).
>
> Throwing away the result is using the result.


Ignoring a result in a way that it will never be created, would mean
to have no result => this would be tailcall-equivalent.

And that was my question! Would ignore throw away the
created results, or would it suppress creating results?!

Now some answers wer: results will be treated and thrown away afterwards.

Then a next question could arise: could it be implemented in a way, that
creating the results would be blocked from the beginning on (so that nothing
must be thrown away, because nothing would be created)?

This is not really an urgent question, only something,
that during the last two days sometimes came to my mind.


Ciao,
   Oliver


      reply	other threads:[~2007-08-04 19:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-04 10:58 tmp123
2007-08-04 12:27 ` [Caml-list] " Brian Hurt
2007-08-04 12:34   ` Oliver Bandel
2007-08-04 13:26     ` Julien Moutinho
2007-08-04 14:52     ` Brian Hurt
2007-08-04 19:24       ` Oliver Bandel [this message]

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=1186255447.46b4d25719255@webmail.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).