[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] Regarding the hide declaration, #1376
From: |
megane |
Subject: |
Re: [Chicken-hackers] Regarding the hide declaration, #1376 |
Date: |
Tue, 06 Jun 2017 11:46:20 +0300 |
User-agent: |
mu4e 0.9.18; emacs 24.4.1 |
address@hidden writes:
>
> Hi!
>
>
> Sorry, I'm rather late to this discussion, and I apologize for that. But
> note that
> the whole idea to extend the hide declaration for unexporting from modules is
> bogus. Declarations work at a completely different level, and aren't even
> aware
> of syntax-bindings, IIRC. If you want to make a module-level identifier not
> visible,
> then just remove it from the export list. If you are forced to use "*", then
> a special
> form (like "unexport") would be better. Declarations are not the right place
> for
> this.
Hi!
First, let me ramble some:
1. If you hide an exported identifier the compiler is free to drop the
actual definition from the compiled object. This happens without any
warnings currently and you get a runtime error if you try to use the
identifier.
2. If an identifier is not exported I think it's safe to declare it hidden.
3. As you see from the tests, the patch I provided seems to work as it's
supposed to. That is, it unexports identifiers using the hide
declaration. None of my code broke when I recompiled all eggs I'm using.
Just FYI.
Second:
I think there should be a way to remove identifiers from the module export
list. I'm happy to try adding an unexport syntax form if that's a good
idea (that's why I started this thread).
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, Evan Hanson, 2017/06/05
- Re: [Chicken-hackers] Regarding the hide declaration, #1376, Peter Bex, 2017/06/05
- 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 <=
- 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