> 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).
I'm not oppossed to an unexport mechanism in general, but declarations are not the proper way to address this. Just like qualified symbols they are a leftover of the older, unit-related method of namespace management. The fact that "declare" is not available in evaluated code should also indicate that we should find something different. User code should avoid declarations, unless it is truly necessary. Modules do the hiding automatically for unexported identifiers, and I think this is much cleaner and simpler. felix _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers