[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] Regarding the hide declaration, #1376
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] Regarding the hide declaration, #1376 |
Date: |
Mon, 5 Jun 2017 11:43:16 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Jun 05, 2017 at 06:09:54PM +1200, Evan Hanson wrote:
> Is that right? Personally, I'd rather make (declare (hide ...)) simply
> do the right thing -- the right thing being the behaviour you originally
> expected when filing #1376 -- than add a new type of declaration or
> module syntax.
>
> I think this is similar to what Peter has said on that ticket, so a
> patch of that sort would be very welcome.
This is slightly more complicated due to declare being module-unaware.
(declare (hide foo))
(module a * (import chicken scheme) (define foo 1))
(module b * (import chicken scheme) (define foo 2))
Which foo should be hidden? Both, or none?
I think the sane thing to do here is to make it error out,
considering there's no top-level foo to hide, and make it
work like this:
(module a *
(import chicken scheme)
(define foo 1))
(module b *
(declare (hide foo))
(import chicken scheme) (define foo 2))
So here a#foo is visible and exported, while b#foo is hidden and
not exported.
Cheers,
Peter
signature.asc
Description: Digital signature
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, Evan Hanson, 2017/06/05
- Re: [Chicken-hackers] Regarding the hide declaration, #1376,
Peter Bex <=
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, Evan Hanson, 2017/06/05
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, megane, 2017/06/06
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, felix . winkelmann, 2017/06/06
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, megane, 2017/06/06
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, felix . winkelmann, 2017/06/06
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, Peter Bex, 2017/06/06
Re: [Chicken-hackers] Regarding the hide declaration, #1376, megane, 2017/06/05