Import concerns revisited
Deewiant
deewiant.doesnotlike.spam at gmail.com
Mon Jul 10 00:49:53 PDT 2006
Kirk McDonald wrote:
> Deewiant wrote:
>> John Reimer wrote:
>>
>>> "in" seems inappropriate in this situation. "as" perfectly
>>> correlates to a
>>> renaming or aliasing action. "in" is confusing and looks more like
>>> an action on
>>> a set.
>>>
>>
>>
>> If you read it as "into" I think it should make sense, if you think of
>> namespaces:
>>
>> import foo.bar in foobar; // import foo.bar into the foobar namespace
>
> Except you aren't importing it /into/ the foobar namespace, you're
> importing it /as/ the foobar namespace.
>
What's the difference? I create the namespace when importing a module, and put
everything from that module /into/ the namespace.
If it won't be possible to import multiple modules into the same namespace, then
"as" might make more sense, I admit. But IMHO the difference between the
meanings is so small that we don't need a new keyword for this; overloading
"static" yet again, on the other hand, is much worse, and the new meaning is far
from intuitive.
More information about the Digitalmars-d
mailing list