[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: |
Thu, 08 Jun 2017 11:45:04 +0200 |
> On Wed, Jun 7, 2017 at 2:06 PM, <address@hidden> wrote:
>
> 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.
> >
>
> My example is bad: you'd want to use it with a module where all the names
> begin with the same prefix, or almost all. Another application is to drop
> the author's prefix and then add your own: (import (prefix (drop-prefix
> srfi-13 string-) s:)) would change all the SRFI 13 identifiers beginning
> "string-" to begin "s:" instead (you'd want to change the Scheme
> identifiers too).
>
> An open question is what to do when an identifier is the same as the
> prefix: Chibi imports it unchanged, Chez changes it to || (the empty
> identifier). A third possibility is to not import it.
Yes, I do see the point. But still, as your second paragraph suggests, this
opens up certain corner cases which I think could be avoided by not
introducing this feature at all.
felix
Re: [Chicken-hackers] [PATCH] Add unexport form for modules, felix . winkelmann, 2017/06/07