unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: tell@telltronics.org, guile-user@gnu.org
Subject: Re: 1.5.6: (bound? ) missing from optargs.scm
Date: 01 Apr 2002 00:59:57 +0200	[thread overview]
Message-ID: <87bsd4pclu.fsf@zagadka.ping.de> (raw)
In-Reply-To: <E16qjNd-0000HF-00@giblet>

Thien-Thi Nguyen <ttn@giblet.glug.org> writes:

> 2001-05-10  Marius Vollmer  <mvo@zagadka.ping.de>
> 
> 	* optargs.scm (bound?): Removed.  We should not play games with
> 	the magical undefined value.
> 
> i don't particularly understand what kinds of games are no longer being
> played, nor what is the suggested way to achieve prior functionality.

SCM_UNDEFINED is used in C code to flag a variable that exists but has
no value associated with it.  For example, 'letrec' first creates all
new local variables with SCM_UNDEFINED as their value, and any try to
read their value will result in an error.  It also used as a special
not-a-legal-Scheme-value token in C code, for example with scm_list_n.

When Scheme code gets access to it, and treats it like any other
Scheme value, a lot of assumptions in the C code break down.

The old (ice-9 optargs) used this value as the default default value,
i.e. the value to use as the default value when no explicit default
value was specified.

We can use any other unique default default value, for example the
result of '(cons* 'unbound)'.

It might be tempting to use the un_specified_ value, SCM_UNSPECIFIED,
instead of SCM_UNDEFINED, but that wouldn't be really right, either.
SCM_UNSPECIFIED is a perfectly usable Scheme value (which
SCM_UNDEFINED is not), but it is not really specific to this purpose:
you will get it from a lot of functions, and you would then not be
able to distinguish whether your keyword has not been specified at the
call side, or whether it has been specified but with the unspecified
value (which would likely be an error, but you wouldn't notice).

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


      parent reply	other threads:[~2002-03-31 22:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-28  6:30 1.5.6: (bound? ) missing from optargs.scm Steve Tell
2002-03-28  8:52 ` Thien-Thi Nguyen
2002-03-28 23:32   ` Thien-Thi Nguyen
2002-03-29  6:40     ` Steve Tell
2002-03-29  7:44       ` Thien-Thi Nguyen
2002-03-30  2:26         ` Steve Tell
2002-03-30  4:42           ` Thien-Thi Nguyen
2002-03-31 22:06             ` Marius Vollmer
2002-04-01  1:42               ` Thien-Thi Nguyen
2002-03-31 22:46           ` Marius Vollmer
2002-04-24 17:52             ` Marius Vollmer
2002-03-31 22:59     ` Marius Vollmer [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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=87bsd4pclu.fsf@zagadka.ping.de \
    --to=mvo@zagadka.ping.de \
    --cc=guile-user@gnu.org \
    --cc=tell@telltronics.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 read-only IMAP folder(s) and NNTP newsgroup(s).