From: ludo@gnu.org (Ludovic Courtès)
To: Andreas Rottmann <a.rottmann@gmx.at>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH] Don't mix definitions and expressions in SRFI-9
Date: Wed, 09 Mar 2011 21:43:54 +0100 [thread overview]
Message-ID: <8739mwc9dh.fsf@gnu.org> (raw)
In-Reply-To: <871v2i4fby.fsf@gmx.at> (Andreas Rottmann's message of "Tue, 08 Mar 2011 01:37:53 +0100")
Hi Andreas,
Andreas Rottmann <a.rottmann@gmx.at> writes:
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hi,
>>
>> Andy Wingo <wingo@pobox.com> writes:
>>
>>> On Sun 06 Mar 2011 23:26, ludo@gnu.org (Ludovic Courtès) writes:
>>>
>>>> Andreas Rottmann <a.rottmann@gmx.at> writes:
>>>>
>>>>> The expansion of `define-inlinable' contained an expression, which made
>>>>> SRFI-9's `define-record-type' fail in non-toplevel contexts ("definition
>>>>> used in expression context").
>>>>
>>>> SRFI-9 says “Record-type definitions may only occur at top-level”, and
>>>> I’m inclined to stick to it. If we diverge, then people could write
>>>> code thinking it’s portable SRFI-9 code while it’s not.
>>>
>>> Does anyone actually care about this? We provide many compatible
>>> extensions to standard interfaces. It seems like this would be an
>>> "unnecessary restriction which makes `let-record-type' seem necessary".
>>
>> OK, I lost. ;-)
>>
>> But, can we:
>>
>> 1. Document the extension.
>>
>> 2. Choose PROC-NAME such that -Wunused-toplevel won’t complain.
>> There’s a trick for this: if it contains white space, then
>> -Wunused-toplevel won’t complain; however, it has to be generated
>> deterministically because it can appear in other compilation units,
>> so we can’t use ‘generate-temporaries’ here.
>>
> I think the attached version of the patch takes your suggestions into
> account.
Thanks, applied!
Ludo’.
prev parent reply other threads:[~2011-03-09 20:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-06 16:39 [PATCH] Don't mix definitions and expressions in SRFI-9 Andreas Rottmann
2011-03-06 22:26 ` Ludovic Courtès
2011-03-06 23:05 ` Alex Shinn
2011-03-06 23:21 ` Ludovic Courtès
2011-03-07 0:31 ` Andreas Rottmann
2011-03-07 10:55 ` Andy Wingo
2011-03-07 10:52 ` Andy Wingo
2011-03-07 13:36 ` Ludovic Courtès
2011-03-08 0:37 ` Andreas Rottmann
2011-03-09 20:43 ` Ludovic Courtès [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=8739mwc9dh.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=a.rottmann@gmx.at \
--cc=guile-devel@gnu.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).