chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] export/rename


From: Evan Hanson
Subject: Re: [PATCH] export/rename
Date: Wed, 4 Oct 2023 13:24:32 +1300

Maybe this already works with the current patch, but can we support:

    (export (rename foo bar))

As well as the version with the colon (suffix keyword notation) on the end of 
export?
Seems like that would be best for symmetry with the import form.

(Sorry, it’s just aesthetics, I know.)

Evan

> On 3/10/2023, at 11:51 PM, felix.winkelmann@bevuta.com wrote:
> 
>> On Mon, Oct 02, 2023 at 06:31:44PM +0200, felix.winkelmann@bevuta.com wrote:
>>> This patch adds a new special form to explicitly export renamed bindings 
>>> from a module:
>>> 
>>>    (export/rename (OLD NEW) ...)
>> 
>> Why not add it to the regular "export" form?  It's already extendable,
>> as it has syntax: and interface:.  So for example we could have:
>> 
>>  (export (rename: OLD NEW) ...)
>> 
>> Saves having yet another top-level special-case form.
> 
> Ok, I find attached a variant, both more ugly in interface and 
> implementation, since ##core#module and functor do not yet allow
> renamings to be handled. Also, "define-interface" has no notion
> of this, so "(rename: OLD NEW)" is purely applicable in "export".
> 
> I prefer the first variant, but feel free to push which one you
> like more.
> 
> 
> felix
> <0001-allow-renaming-exports-in-export-form.patch>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]