Re: export & public
- Posted by mattlewis (admin) Dec 05, 2008
- 1295 views
Might either of the words "private" or "restrict" better communicate the intention of the word "export"?
Export means "to send an item out from", without implying any innate restriction as to where the item might end up at, which seems to not be what is intended by using it in V4.0
"private" and "restrict" both seem to fairly clearly indicate that a symbol referenced by them is only available for use by the file that included the file containing the symbol.
I think that private and restrict are counter-intuitive in this usage, since they both seem to imply the opposite of other files being able to see the symbols.
Perhaps something like "friend" would be a better term than "export". I'm thinking of a C concept where the friends of a class can see the class' privates. It's not a perfect analogy.
Matt