[Mono-list] Mixing languages within

Jonathan Gilbert 2a5gjx302@sneakemail.com
Fri, 10 Dec 2004 17:41:35 -0500


At 09:58 AM 10/12/2004 -0800, Richard Norman wrote: 

>>>>

Jonathan,

  

Actually this is part of the proposed spec (partial classes). As I see it
from the latest information on MSDN.

(<<http://msdn.microsoft.com/vcsharp/team/language/default.aspx>http://msdn.microsoft.com/vcsharp/team/language/default.aspx)



They have a PDF file with some of the proposed information
(<<http://download.microsoft.com/download/8/1/6/81682478-4018-48fe-9e5e-f87a44af3db9/Standard.pdf>http://download.microsoft.com/download/8/1/6/81682478-4018-48fe-9e5e-f87a44af3db9/Standard.pdf)
I don't know if there is a newer release of this document, but it seems
that "partial" is planed to be part of the spec.

<<<<<<<<


Yes, of course, part of the *language* specification. That does not
necessarily mean, though, that its implementation is based on a
corresponding *framework* feature. To be honest, I haven't done the
research, but it seems likely to me that .NET itself does not allow just
part of a class to be present in a .netmodule. I could be wrong here, but
on that assumption, I meant that the compiler would have to "see" all
parts of the class in a single invocation. If I am right, then for a
class split across file1.cs and file2.cs, "csc /target:module file1.cs"
and "csc /target:module file2.cs" individually would fail, but "csc
/target:module file1.cs file2.cs" would succeed. If am wrong, then .NET
itself allows a class's definition to spread across multiple .netmodules.
I don't have .NET 2.0, so I can't check :-)


And when you refer to XAML being compiled with VB.NET or C#, you must see
that this is the same concept as ASP.NET: the XAML file is translated to
the actual framework language first, and then the resulting .vb or .cs
file is passed to the VB.NET or C# compiler.


Jonathan Gilbert