<div class="gmail_quote">On 26 January 2012 03:15, Adam Wilson <span dir="ltr"><<a href="mailto:flyboynw@gmail.com">flyboynw@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, 25 Jan 2012 15:05:43 -0800, Manu <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
On 26 January 2012 00:55, Adam Wilson <<a href="mailto:flyboynw@gmail.com" target="_blank">flyboynw@gmail.com</a>> wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
On Wed, 25 Jan 2012 14:44:09 -0800, Manu <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote:<br>
<br>
 On 26 January 2012 00:37, Adam Wilson <<a href="mailto:flyboynw@gmail.com" target="_blank">flyboynw@gmail.com</a>> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
 On Wed, 25 Jan 2012 14:28:46 -0800, Manu <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
 On 25 January 2012 23:59, Adam Wilson <<a href="mailto:flyboynw@gmail.com" target="_blank">flyboynw@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
 On Wed, 25 Jan 2012 13:35:38 -0800, Manu <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
 On 25 January 2012 21:47, bls <<a href="mailto:bizprac@orange.fr" target="_blank">bizprac@orange.fr</a>> wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 On 01/25/2012 07:03 AM, Manu wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 This is fairly interesting. MS have extended their C++ compiler<br>
<br>
 significantly for Windows8 with a bunch of non-standard stuff.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FINALLY implement garbage collection, ref counting, properties,<br>
delegates, events, generics, etc...<br>
If other compilers adopt this tech, D loses some advantages.<br>
<br>
<br>
 But you still have to fight with ifndef ,forward declaration, and a<br>
<br>
</blockquote>
template syntax against common sense.  Even if you paint shit yellow<br>
it's<br>
not necessarily gold.<br>
<br>
<br>
 True, but I think this will mitigate a lot of the motivation Windows<br>
<br>
</blockquote>
devs<br>
have to seek another language if they're not developing cross platform<br>
apps.<br>
<br>
Sadly, since WinRT requires using these language extensions to<br>
interface<br>
with the new windows runtime, you won't be able to write a Windows8<br>
app<br>
in<br>
D.<br>
Interestingly though, D supports almost everything they've added to<br>
C++. I<br>
wonder if it would be possible to do extern(Windows8) to produce a<br>
compatible ABI for linking with MS C++ apps?<br>
<br>
The most interesting features are 'ref new' and 'gcnew', which makes<br>
me<br>
wonder, since Windows8 has an OS garbage collector, would it be at all<br>
possible to have D use the Windows8 GC? I'd prefer this to using D's<br>
own<br>
GC<br>
if it would be supported, and obviously this would be a requirement<br>
if D<br>
was going to interact with WinRT properly.<br>
Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to<br>
my<br>
understanding) objects. I think I read somewhere that D already has<br>
extern(COM) no? I wonder if Windows8 ref type linkage is already<br>
technically supported in D?<br>
<br>
<br>
 There is no Win8GC, it's all ref counted. WinRT is COM with extras<br>
</blockquote>
and as<br>
such should be accessible to D. It would need some extra glue code over<br>
what we have now ... like the IInspectable interface.<br>
<br>
<br>
 Really? So what's 'gcnew' for?<br>
</blockquote>
<br>
<br>
</blockquote>
That's for targeting the CLR (.NET) so it doesn't conflict with<br>
new/delete<br>
in regular C++. It goes all the way back to the first C++/CLI in Visual<br>
Studio 2005.<br>
</div></div><a href="http://msdn.microsoft.com/en-****us/library/te3ecsc8.aspx" target="_blank">http://msdn.microsoft.com/en-*<u></u>***us/library/te3ecsc8.aspx</a><<a href="http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx" target="_blank">ht<u></u>tp://msdn.microsoft.com/en-**<u></u>us/library/te3ecsc8.aspx</a>><br>

<http**://<a href="http://msdn.microsoft.com/en-us/**library/te3ecsc8.aspx" target="_blank">msdn.microsoft.com/<u></u>en-us/**library/te3ecsc8.aspx</a><<a href="http://msdn.microsoft.com/en-us/library/te3ecsc8.aspx" target="_blank"><u></u>http://msdn.microsoft.com/en-<u></u>us/library/te3ecsc8.aspx</a>><br>

><br>
<br>
</blockquote><div class="im">
<br>
<br>
So there is a GC... It just happens to be the .net GC. Is that a problem?<br>
Obviously it's accessible in C++ code. Can you use it to allocate C++<br>
objects, or is it exclusively for some sort of interaction with .net?<br>
If the rest of the platform is using it...<br>
<br>
</div></blockquote><div class="im">
<br>
It's exclusively for the .NET Framework and requires the .NET Framework to<br>
be installed and loaded to run. It's the .NET Runtime, and as such, it<br>
would be VERY unwise to base anything D on it.<br>
</div></blockquote>
<br>
<br><div class="im">
.NET will be a requirement on all Win8 machines. You didn't answer though,<br>
can you use the .NET GC to allocate C++ objects to use throughout your<br>
native program? Or is gcnew strictly for interfacing C++ with .NET, like<br>
C++/CLI?<br>
</div></blockquote>
<br>
It is strictly for allocating .NET objects. You CANNOT allocate C++ objects with the .NET GC, that was implied by the statement on the use of the .NET GC.</blockquote><div><br></div><div>I see, well that's good. I presume then that it shouldn't be too much trouble to implement MS C++'s ref type ABI in D then if it is just basically COM.</div>
<div>How about 'delegate'? Would it be trouble to make the extern ABI compatible when passing delegates between MSC++/D?</div></div>