[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Don't mix definitions and expressions in SRFI-9
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] Don't mix definitions and expressions in SRFI-9 |
Date: |
Wed, 09 Mar 2011 21:43:54 +0100 |
User-agent: |
Gnus/5.110013 (No Gnus v0.13) Emacs/23.2 (gnu/linux) |
Hi Andreas,
Andreas Rottmann <address@hidden> writes:
> address@hidden (Ludovic Courtès) writes:
>
>> Hi,
>>
>> Andy Wingo <address@hidden> writes:
>>
>>> On Sun 06 Mar 2011 23:26, address@hidden (Ludovic Courtès) writes:
>>>
>>>> Andreas Rottmann <address@hidden> 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’.