[Issue 357] D keywords in import/module are (unnecessary) forbidden

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 20 15:19:27 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=357


fvbommel at wxs.nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Linux                       |All




------- Comment #1 from fvbommel at wxs.nl  2006-09-20 17:19 -------
Allowing this would wreak havoc on fully qualified names. Either those would
effectively be disallowed for those modules or the restrictions that
identifiers can't contain keywords would have to be lifted.
The latter solution would definitely create ambiguities. Think of the following
code, for example:

    import alias;
    // ... some more code ...
    alias.foo bar;

Does this declare a variable bar of type alias.foo, or does this create an
alias bar for an identifier foo in the top-level namespace?

This is a bad idea. Either inconsistencies or ambiguities will be introduced if
this change is made.


-- 




More information about the Digitalmars-d-bugs mailing list