[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Preferred namespace cscc option

From: Peter Minten
Subject: [DotGNU]Preferred namespace cscc option
Date: Fri, 26 Jul 2002 13:21:29 +0200


would it be possible to add an option to cscc telling it to prefer a certain
namespace in cases of ambiguousness? 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. 

I figure that if cscc had an for example '--fpreferred-namespace=namespace'
option this could be solved. I my idea the compiler would then in cases of
ambiguousness search for the class name that contains the namespace string in
the option thus solving the problem and making life with DG-Base much easier. Or
as a shortcut maybe a --prefer-dgbase option could be used to make pnet.

Or would it perhaps be possible to use attributes for this (eg
[prefns=namespace]), this would allow for per class decision on the preferred
namespace (I don't really think this is possible since AFAIK the ambiguousness
detection code is in one of the first compiler fases).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]