[Mono-list] C# changes
Michel Dagenais
michel.dagenais@polymtl.ca
11 Nov 2002 14:03:04 -0500
> The Modula-3 example you gave seems similar to how Ada and C++ (sort-of)
> handle things: you declare the public interface to the class, and define
> the implementation "elsewhere".
It was a simple example but partial type revelations could be used for
much more. You could have fields as well as methods and as many levels
as you like.
> Each partial class can appear in its own file. I would imagine that the
> restriction is that all files that make up a given partial class must be
> compiled at the same time, e.g. `csc Test_Foo.cs Test_Bar.cs'. I doubt
> that you could put a partial class into a .netmodule file, and have each
> partial class in a separate .netmodule/.dll/.exe combination.
I see, if you want the possibility of separate compilation, then you
fall back on the same challenges as Modula-3 partial type revelations:
the structure size and fields offsets cannot be known at compile time.
In a sense, however, partial types are probably simpler than partial
type revelations since it does not play with the inheritance chain.
Anyhow, generics and partial types seem desirable, I just wonder how
easily they will be incorporated into Mono...