[m-rev.] [dotnet] diff: fix namespaces bugs.
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Apr 14 14:38:43 AEST 2001
On 13-Apr-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> Branches: dotnet-foreign
>
> compiler/mlds_to_il.m:
> In the module foo.m, all the code is now placed into a type called
> mercury_code in the namespace foo, rather then in they type foo and
> no namespace. This avoids problems where you cannot have a type and
> namespace at the top level with the same name.
There's a similar issue for the Java back-end, because Java doesn't
allow a type and a namespace with the same name.
Julien Fischer and I discussed that in some detail,
and decided on a different solution:
give the namespace a name starting with a lowercase letter
and give the class a name starting with an uppercase letter.
This solution is nicer for interoperability, since it is more
in line with the usual Java naming conventions. I think the
same would be true for the .NET back-end.
What problems arise in .NET if you have a namespace and a class
with the same name?
Also, just to help me understand the problem: does this situation where
we have generate namespace and a class with the same name occur only
for Mercury code using nested modules?
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list