chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Add unexport form for modules


From: felix . winkelmann
Subject: Re: [Chicken-hackers] [PATCH] Add unexport form for modules
Date: Wed, 07 Jun 2017 20:06:42 +0200

> On Wed, Jun 7, 2017 at 9:28 AM, megane <address@hidden> wrote:
>
> If the module export list is not *, module-unexport-list is not used. In
> > this case, it's enough to just remove the identifier to be unexported
> > from the module-export-list.
> >
>
> Very nice!
>
> While you are messing around with the module system, I'd like to see
> "strip-prefix", which is just like "prefix" except it removes a prefix from
> identifiers (if present) rather than adding one.  So:
>
> (import (except scheme + - * / bla bla bla))
> (import (strip-prefix chicken "fp"))
>
> causes fp+ to be imported as +, fp- to be imported as -, etc. etc., for
> programs that don't use exact numbers.  This isn't something you need to do
> that often, and it adds no power to rename (but then neither does prefix),
> but it can be useful.

Isn't it easy to forget particular identifiers that happen to start with "fp"
as well? I think explicit "rename" imports are clearer and less error prone.


felix




reply via email to

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