[Mono-list] Mixing languages within

Richard Norman normri@samc.com
Fri, 10 Dec 2004 09:58:58 -0800


This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=__Part81A174F2.0__=
Content-Type: text/plain;
 charset=us-ascii
Content-Transfer-Encoding: 7bit

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)
 
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)
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 I believe that you are correct that the compiler needs to support
it (a compile time issue not a runtime issue) but they are still
separate code files that you compile into one. The multi-assembly
namespace is available now though.
 
XAML is just the class definitions laid out in XML. The XAML is
compiled either with VB.NET or C# then the two class files are "merged"
to form the executable (if my understanding is still correct from the
demos).
 
In Longhorn you should also be able to run a XAML file directly (I
believe this was demoed as well) which is then compiled and ran like a
normal application. But again, the particular language needs to be
specified.
 
:-) Don't you love it when these discussions go so far away from the
original questions... On a MONO board at that... Anyway, I am still
learning and have not been to all of the conferences and training
courses yet, but I try to keep up with what I can. Mostly I believe that
the above is correct. If not, forgive the ignorance... Like I said I am
still learning...
 
 
Richard Norman
Web/Application Developer
http://www.jazzynupe.net/blog/
 
 
***************************************
Message: 8
Date: Thu, 09 Dec 2004 22:43:24 -0500
To: mono-list@lists.ximian.com 
From: "Jonathan Gilbert" <2a5gjx302@sneakemail.com>
Subject: RE: [Mono-list] Mixing languages within
 
At 04:58 PM 09/12/2004 -0800, Richard Norman wrote: 
 
[snip]
 
>>>>
 
In .NET 2.0 there is the notion of "partial" classes where for example
XAML files describe one part of the class and say a VB file describes
another. But again the languages they are compiled with must be the
same
(Example:
<<http://www.devx.com/dotnet/Article/22603/1954?pf=true>http://www.devx.com/dotnet/Article/22603/1954?pf=true

)
 
<<<<<<<<
 

I'm not certain, but I believe this is more of a compiler hack than
anything supported innately by .NET. The compiler has to see all the
separate source code files before it can produce the class in IL, and
the
XAML is translated to C# before the real compilation starts.
 

Jonathan Gilbert


--=__Part81A174F2.0__=
Content-Type: text/html;
 charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML

<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dwindows-125=
2">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Jonathan,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Actually this is part of the proposed spec (partial classes). As I =
see it from the latest information on MSDN.</DIV>
<DIV>(<A href=3D"http://msdn.microsoft.com/vcsharp/team/language/default.as=
px">http://msdn.microsoft.com/vcsharp/team/language/default.aspx</A>)</DIV>=

<DIV>&nbsp;</DIV>
<DIV>They have a PDF file with some of the proposed information (<A =
href=3D"http://download.microsoft.com/download/8/1/6/81682478-4018-48fe-9e5=
e-f87a44af3db9/Standard.pdf">http://download.microsoft.com/download/8/1/6/8=
1682478-4018-48fe-9e5e-f87a44af3db9/Standard.pdf</A>) I don't know if =
there is a newer release of this document, but it seems that "partial" =
is&nbsp;planed to be part of the spec.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Yes I believe that you are correct that the compiler needs to support =
it (a compile time issue not a runtime issue) but they are still separate =
code files that you compile into one. The multi-assembly namespace is =
available now though.</DIV>
<DIV>&nbsp;</DIV>
<DIV>XAML is just the class definitions laid out in XML. The XAML is =
compiled either with VB.NET or C# then the two class files are "merged" to =
form the executable (if my understanding&nbsp;is still correct from the =
demos).</DIV>
<DIV>&nbsp;</DIV>
<DIV>In Longhorn you should also be able to run a XAML file directly (I =
believe this was demoed as well) which is then compiled and ran like a =
normal application. But again, the particular language needs to be =
specified.</DIV>
<DIV>&nbsp;</DIV>
<DIV>:-) Don't you love it when these discussions go so far away from the =
original questions... On a MONO board at that... Anyway, I am still =
learning and have not been to all of the conferences and training courses =
yet, but I try to keep up with what I can. Mostly I believe that the above =
is correct. If not, forgive the ignorance... Like I said I am still =
learning...</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Richard Norman</DIV>
<DIV>Web/Application Developer</DIV>
<DIV><A href=3D"http://www.jazzynupe.net/blog/">http://www.jazzynupe.net/bl=
og/</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>***************************************</DIV>
<DIV>Message: 8<BR>Date: Thu, 09 Dec 2004 22:43:24 -0500<BR>To: <A =
href=3D"mailto:mono-list@lists.ximian.com">mono-list@lists.ximian.com</A> =
<BR>From: "Jonathan Gilbert" &lt;<A href=3D"mailto:2a5gjx302@sneakemail.com=
">2a5gjx302@sneakemail.com</A>&gt;<BR>Subject: RE: [Mono-list] Mixing =
languages within</DIV>
<DIV>&nbsp;</DIV>
<DIV>At 04:58 PM 09/12/2004 -0800, Richard Norman wrote: </DIV>
<DIV>&nbsp;</DIV>
<DIV>[snip]</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt;&gt;&gt;&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>In .NET 2.0 there is the notion of "partial" classes where for =
example<BR>XAML files describe one part of the class and say a VB file =
describes<BR>another. But again the languages they are compiled with must =
be the same<BR>(Example:<BR>&lt;&lt;<A href=3D"http://www.devx.com/dotnet/A=
rticle/22603/1954?pf=3Dtrue>http://www.devx.com/dotnet/Article/22603/1954?p=
f=3Dtrue">http://www.devx.com/dotnet/Article/22603/1954?pf=3Dtrue&gt;http:/=
/www.devx.com/dotnet/Article/22603/1954?pf=3Dtrue</A> <BR>)</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>I'm not certain, but I believe this is more of a compiler hack =
than<BR>anything supported innately by .NET. The compiler has to see all =
the<BR>separate source code files before it can produce the class in IL, =
and the<BR>XAML is translated to C# before the real compilation starts.</DI=
V>
<DIV>&nbsp;</DIV>
<DIV><BR>Jonathan Gilbert<BR></DIV></BODY></HTML>

--=__Part81A174F2.0__=--