For Windows 8 the WinRT projections for .NET and C++/CX seem to replace C++/CLI.<div><br></div><div><a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-690C">http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-690C</a> </div>
<div><br></div><div>Best regards</div><div>Mello<br><div><br></div><div><br><br><div class="gmail_quote">On Fri, Jul 20, 2012 at 10:20 AM, João Matos <span dir="ltr"><<a href="mailto:ripzonetriton@gmail.com" target="_blank">ripzonetriton@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> It's a fairly extensive and complicated extension to C++, and it seems unlikely that Clang will ever actually be a useful C++/CLI compiler. Moreover, the advent of C++/CX and the recent push toward native code makes the long-term future of C++/CLI completely unclear, and I'd rather not have us chasing yesterday's technology.<br>

<br>
</div>Native and managed code have different advantages, so I don't see<br>
managed code getting replaced by native code soon. What I see is<br>
native code being used for the lower level parts of software where<br>
performance really matters, with a managed layer for extensibility-<br>
and C++/CLI is the bridge. I do get your point though, and agree that<br>
the drawbacks might outweigh the benefits.<br>
<div class="im"><br>
> C++/CX seems like a more reasonable goal for Clang as a project, because (1) it's more conceivable that we could actually provide a useful C++/CX compilation environment, and (2) it seems to be the new direction for Microsoft. Plus, I think it might be a little smaller and, therefore, slightly easier to implement.<br>

<br>
</div>In terms of complexity, they both seem really similiar syntax-wise. MS<br>
has re-used most of their previous work on C++/CLI for C++/CX, here is<br>
a summary of differences:<br>
<br>
Basic types:<br>
 CLI: From mscorlib.dll (System::* types)<br>
 CX:  From vccorlib.dll (Platform::* types)<br>
<br>
Lifetime management:<br>
 CLI: Garbage collected<br>
 CX:  Refcounted<br>
<br>
Cycles Broken:<br>
 CLI: By garbage collector<br>
 CX:  Broken by user (weak references or explicit delete)<br>
<br>
Code generation:<br>
 CLI: MSIL + native code. Can create a cross-platform binary if MSIL-only.<br>
 CX:  Native code only. Binaries target a specific platform.<br>
<br>
Object Creation:<br>
 CLI: gcnew<br>
 CX:  ref new<br>
<br>
interior_ptr:<br>
 CLI: Supported<br>
 CX:  Not supported<br>
<br>
pin_ptr:<br>
 CLI: Supported<br>
 CX:  Not supported<br>
<br>
V% (% when it refers to a byref (kind'a like an "interior_ref") ):<br>
 CLI: Supported<br>
 CX:  Not supported<br>
<br>
R% (% when it refers to an implicitly dereferenced ref type):<br>
 CLI: Supported<br>
 CX:  Supported<br>
<br>
Ref to ^:<br>
 CLI: R^%<br>
 CX:  R^&<br>
<br>
Boxing:<br>
 CLI: syntax V^<br>
 CX:  IReference<V>^<br>
<br>
Dereferenced box type:<br>
 CLI: V%<br>
 CX:  const V<br>
<br>
Generics:<br>
 CLI: Generics classes, interfaces & delegates allowed.<br>
 CX:  Generic interfaces & delegates only.<br>
<br>
Static constructors:<br>
 CLI: Supported<br>
 CX:  Not supported<br>
<br>
Address of member of ref class:<br>
 CLI: Returns an interior_ptr<br>
 CX:  Returns a type*<br>
<br>
friends:<br>
 CLI: Not supported<br>
 CX:  Supported<br>
<br>
C++ class embedded in ref class:<br>
 CLI: Not supported<br>
 CX:  Supported<br>
<br>
ref class embedded in C++ class:<br>
 CLI: Not supported<br>
 CX:  Supported (R-on-stack)<br>
<br>
^ embedded in C++ class:<br>
 CLI: Not supported (Needs GCHandle)<br>
 CX:  Supported<br>
<br>
^ embedded in value class with value class on native heap:<br>
 CLI: Not supported<br>
 CX:  Supported (for String^)<br>
<br>
Global ^:<br>
 CLI: Not supported<br>
 CX:  Supported<br>
<br>
Global R-on-stack:<br>
 CLI: Not supported<br>
 CX:  Supported<br>
<br>
Finalizer:<br>
 CLI: Supported<br>
 CX:  Not supported<br>
<br>
Destructor:<br>
 CX:  Runs on IDisposable::Dispose (delete / stack unwind) only<br>
 CLI: Runs on IDisposable::Dispose (delete / stack unwind) -or- last<br>
release (never both)<br>
<br>
T::typeid:<br>
 CLI: Supported<br>
 CX:  Not supported<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
João Matos<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>