unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Re: r6rs define-record-type is unhygienic
       [not found] ` <877h8kamas.fsf@pobox.com>
@ 2011-06-17 18:35   ` Mark H Weaver
  2011-06-17 22:34     ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Mark H Weaver @ 2011-06-17 18:35 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Andy Wingo <wingo@pobox.com> wrote on bug-guile:
>> +         (let loop ((_fields *unspecified*)
>> +                    (_parent *unspecified*)
>
> I realize this was in the original code, but better to use some other
> value to indicate a non-initialized value.  In the future *unspecified*
> will be the same as (values).

I don't think *unspecified* should become (values).  In the scheme
reports and elsewhere, "an unspecified value" generally means a single
value which could be anything.  This is a different concept than
(values), which is no value at all, more like a (void) return type in C.
Unfortunately, in Guile these two concepts have been conflated, and
*unspecified* is returned in many places where (values) would be more
appropriate.

It would be very misleading to use the name *unspecified* to refer to
(values), when it is widely understood to mean something different.

IMHO, we should leave *unspecified* alone, and instead change selected
uses of *unspecified* to (values).

What do you think?

    Best,
     Mark



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: r6rs define-record-type is unhygienic
  2011-06-17 18:35   ` r6rs define-record-type is unhygienic Mark H Weaver
@ 2011-06-17 22:34     ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2011-06-17 22:34 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guile-devel

On Fri 17 Jun 2011 20:35, Mark H Weaver <mhw@netris.org> writes:

> Andy Wingo <wingo@pobox.com> wrote on bug-guile:
>>> +         (let loop ((_fields *unspecified*)
>>> +                    (_parent *unspecified*)
>>
>> I realize this was in the original code, but better to use some other
>> value to indicate a non-initialized value.  In the future *unspecified*
>> will be the same as (values).
>
> I don't think *unspecified* should become (values).  In the scheme
> reports and elsewhere, "an unspecified value" generally means a single
> value which could be anything.

This is not the case in R6RS, where the report takes care to indicate
"unspecified values".  One cannot meaningfully ask what the value is of
(if #f #f) -- not in the spec, nor in any specific implementation.

> It would be very misleading to use the name *unspecified* to refer to
> (values), when it is widely understood to mean something different.

It has been understood that way in Guile, yes; but IMO that is an
error, and one that we should fix if we are able.  (Whether we are able
to do so is a different question.)

Regards,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-17 22:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <m37h8ssd67.fsf@googlemail.com>
     [not found] ` <877h8kamas.fsf@pobox.com>
2011-06-17 18:35   ` r6rs define-record-type is unhygienic Mark H Weaver
2011-06-17 22:34     ` Andy Wingo

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