caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: brogoff@speakeasy.net
To: skaller <skaller@users.sourceforge.net>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] List.rev
Date: Fri, 30 Apr 2004 21:38:44 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0404302129010.7938@grace.speakeasy.net> (raw)
In-Reply-To: <1083376750.2581.183.camel@pelican.wigram>

On Fri, 1 May 2004, skaller wrote:
> BTW: documentation that says a function is 'tail recursive'
> is misguided. That's an implementation detail of no
> possible use to a user of the function. The user may
> benefit from knowing the complexity of the function
> in terms of speed and auxilliary storage required.

You couldn't be more wrong. When your program crashes because you've blown
stack and you're embarassed as all hell (you never expected the user to run
with *that* big of an input) you remember that documentation and curse your
own carelessness, rather than the OCaml team.

Since Ocaml optimizes tail calls, that info *is* about auxiliary storage.

On the same point, it would be a good thing if OCaml had a better solution
to these "tail recursion modulo cons" issues than writing set_cdr using
Obj functions. Better means "in the language" here; I'm aware that various
libraries have implemented the set_cdr approach.

There's only a handful of things that bug me about the OCaml language, and
this  makes the list. I'd append it to the list, but it might raise an
exception ;-).


-- Brian

-------------------
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


  parent reply	other threads:[~2004-05-01  4:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-30 17:54 [Caml-list] "List.index" or "List.unique" functions? Rahul Siddharthan
2004-04-30 18:51 ` Martin Jambon
2004-04-30 19:01 ` Benjamin Geer
2004-04-30 19:07   ` Thanks " Rahul Siddharthan
2004-04-30 19:08 ` Karl Zilles
2004-04-30 19:29   ` Matthieu Sozeau
2004-04-30 20:01     ` Karl Zilles
2004-04-30 20:05   ` Remi Vanicat
2004-04-30 20:47     ` JM Nunes
2004-04-30 20:58       ` Karl Zilles
2004-05-01  1:59   ` [Caml-list] List.rev skaller
2004-05-01  4:18     ` Jon Harrop
2004-05-01  4:38     ` brogoff [this message]
2004-05-01  5:12       ` skaller
2004-05-01  7:08         ` William Lovas
2004-05-01  8:10           ` skaller
2004-05-01  8:32             ` Jon Harrop
2004-05-01  9:24               ` skaller
2004-05-02 12:07             ` Andreas Rossberg
2004-05-02 13:29               ` skaller
2004-05-01 10:07         ` Richard Jones
2004-05-01 10:09           ` Nicolas Cannasse
2004-05-02 16:04             ` Brian Hurt
2004-05-01 10:32           ` Jon Harrop
2004-05-01 16:41     ` John Goerzen
2004-05-01 19:11       ` skaller
2004-05-01 10:03 ` [Caml-list] "List.index" or "List.unique" functions? Richard Jones

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.0404302129010.7938@grace.speakeasy.net \
    --to=brogoff@speakeasy.net \
    --cc=caml-list@inria.fr \
    --cc=skaller@users.sourceforge.net \
    /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).