[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Preferred namespace cscc option
From: |
David Sugar |
Subject: |
Re: [DotGNU]Preferred namespace cscc option |
Date: |
Sat, 27 Jul 2002 08:05:35 -0400 |
User-agent: |
KMail/1.4.1 |
Yes, it would be a violation of the language specification. It is a shame
that namespace priorities were never part of the language spec. For example,
in C++, it would be wonderful if one could use "using" statements to merge
references to multiple namespaces but specify one as "default using", so that
if there is an abigious reference, the default priority one would be used
automatically. However, this was not done for C++, Java, or C#, and to do so
outside of the standard would generate results that do not compile correctly
on a standard compliant or alternate implimentation, and while that might
ultimately be the goal of some other company, that is certainly not our goal.
David
On Friday 26 July 2002 06:59 pm, Rhys Weatherley wrote:
> Peter Minten wrote:
> > would it be possible to add an option to cscc telling it to prefer a
> > certain namespace in cases of ambiguousness?
>
> Doing so would technically be a violation of the C# specification,
> which says that ambiguities must be reported. If I added such
> an option, your code would no longer compile on other C# compilers.
>
> > The problem I have is this: if a programmer
> > want's to use DG-Base sockets he/she must use DotGNU.Net.Sockets for the
> > Socket class and System.Net.Sockets for enums like AddressFamily. If
> > he/she would type Socket x = new Socket(); the compiler would give an
> > error because it can't tell if DotGNU.Net.Sockets.Socket or
> > System.Net.Sockets.Socket is meant.
>
> Why not give your Socket class a different name? EnhancedSocket?
>
> Cheers,
>
> Rhys.
> _______________________________________________
> Developers mailing list
> address@hidden
> http://dotgnu.info/mailman/listinfo/developers