www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - MS extend C++ significantly for Windows8... and Andrei got name drop

reply Manu <turkeyman gmail.com> writes:
http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-532T

This is fairly interesting. MS have extended their C++ compiler
significantly for Windows8 with a bunch of non-standard stuff.
FINALLY implement garbage collection, ref counting, properties, delegates,
events, generics, etc...
If other compilers adopt this tech, D loses some advantages.

Oh, and Andrei got a nice little name drop around 35 minutes ;)
Jan 25 2012
next sibling parent reply bls <bizprac orange.fr> writes:
On 01/25/2012 07:03 AM, Manu wrote:
 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.
But you still have to fight with ifndef ,forward declaration, and a template syntax against common sense. Even if you paint shit yellow it's not necessarily gold.
Jan 25 2012
next sibling parent Trass3r <un known.com> writes:
 Even if you paint shit yellow it's not necessarily gold.
:D
Jan 25 2012
prev sibling next sibling parent reply Manu <turkeyman gmail.com> writes:
On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:

 On 01/25/2012 07:03 AM, Manu wrote:

 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.
But you still have to fight with ifndef ,forward declaration, and a template syntax against common sense. Even if you paint shit yellow it's not necessarily gold.
True, but I think this will mitigate a lot of the motivation Windows devs have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D?
Jan 25 2012
next sibling parent reply "Adam Wilson" <flyboynw gmail.com> writes:
On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com> wrote:

 On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:

 On 01/25/2012 07:03 AM, Manu wrote:

 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.
But you still have to fight with ifndef ,forward declaration, and a template syntax against common sense. Even if you paint shit yellow it's not necessarily gold.
True, but I think this will mitigate a lot of the motivation Windows devs have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D?
There is no Win8GC, it's all ref counted. WinRT is COM with extras and as such should be accessible to D. It would need some extra glue code over what we have now ... like the IInspectable interface. And yes, I am running Win8. -- Adam Wilson Project Coordinator The Horizon Project http://www.thehorizonproject.org/
Jan 25 2012
parent reply Manu <turkeyman gmail.com> writes:
On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com> wrote:

 On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com> wrote:

  On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:
  On 01/25/2012 07:03 AM, Manu wrote:
  This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.
But you still have to fight with ifndef ,forward declaration, and a template syntax against common sense. Even if you paint shit yellow it's not necessarily gold.
True, but I think this will mitigate a lot of the motivation Windows devs have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D?
There is no Win8GC, it's all ref counted. WinRT is COM with extras and as such should be accessible to D. It would need some extra glue code over what we have now ... like the IInspectable interface.
Really? So what's 'gcnew' for?
Jan 25 2012
parent reply "Adam Wilson" <flyboynw gmail.com> writes:
On Wed, 25 Jan 2012 14:28:46 -0800, Manu <turkeyman gmail.com> wrote:

 On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com> wrote:

 On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com> wrote:

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

 On Wed, 25 Jan 2012 14:28:46 -0800, Manu <turkeyman gmail.com> wrote:

  On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com> wrote:
  On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com> wrote:
  On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:

  On 01/25/2012 07:03 AM, Manu wrote:

  This is fairly interesting. MS have extended their C++ compiler

 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.


  But you still have to fight with ifndef ,forward declaration, and a
template syntax against common sense. Even if you paint shit yellow it's not necessarily gold. True, but I think this will mitigate a lot of the motivation Windows
devs have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D?
There is no Win8GC, it's all ref counted. WinRT is COM with extras and as such should be accessible to D. It would need some extra glue code over what we have now ... like the IInspectable interface.
Really? So what's 'gcnew' for?
That's for targeting the CLR (.NET) so it doesn't conflict with new/delete in regular C++. It goes all the way back to the first C++/CLI in Visual Studio 2005. http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-us/library/te3ecsc8.aspx>
So there is a GC... It just happens to be the .net GC. Is that a problem? Obviously it's accessible in C++ code. Can you use it to allocate C++ objects, or is it exclusively for some sort of interaction with .net? If the rest of the platform is using it...
Jan 25 2012
next sibling parent reply "Adam Wilson" <flyboynw gmail.com> writes:
On Wed, 25 Jan 2012 14:44:09 -0800, Manu <turkeyman gmail.com> wrote:

 On 26 January 2012 00:37, Adam Wilson <flyboynw gmail.com> wrote:

 On Wed, 25 Jan 2012 14:28:46 -0800, Manu <turkeyman gmail.com> wrote:

  On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com> wrote:
  On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com> wrote:
  On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:

  On 01/25/2012 07:03 AM, Manu wrote:

  This is fairly interesting. MS have extended their C++ compiler

 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.


  But you still have to fight with ifndef ,forward declaration, and  
 a
template syntax against common sense. Even if you paint shit yellow it's not necessarily gold. True, but I think this will mitigate a lot of the motivation Windows
devs have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D?
There is no Win8GC, it's all ref counted. WinRT is COM with extras and as such should be accessible to D. It would need some extra glue code over what we have now ... like the IInspectable interface.
Really? So what's 'gcnew' for?
That's for targeting the CLR (.NET) so it doesn't conflict with new/delete in regular C++. It goes all the way back to the first C++/CLI in Visual Studio 2005. http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-us/library/te3ecsc8.aspx>
So there is a GC... It just happens to be the .net GC. Is that a problem? Obviously it's accessible in C++ code. Can you use it to allocate C++ objects, or is it exclusively for some sort of interaction with .net? If the rest of the platform is using it...
It's exclusively for the .NET Framework and requires the .NET Framework to be installed and loaded to run. It's the .NET Runtime, and as such, it would be VERY unwise to base anything D on it. -- Adam Wilson Project Coordinator The Horizon Project http://www.thehorizonproject.org/
Jan 25 2012
parent reply Manu <turkeyman gmail.com> writes:
On 26 January 2012 00:55, Adam Wilson <flyboynw gmail.com> wrote:

 On Wed, 25 Jan 2012 14:44:09 -0800, Manu <turkeyman gmail.com> wrote:

  On 26 January 2012 00:37, Adam Wilson <flyboynw gmail.com> wrote:
  On Wed, 25 Jan 2012 14:28:46 -0800, Manu <turkeyman gmail.com> wrote:
  On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com> wrote:

  On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com> wrote:

  On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:


  On 01/25/2012 07:03 AM, Manu wrote:


  This is fairly interesting. MS have extended their C++ compiler

  significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.


  But you still have to fight with ifndef ,forward declaration, and a
template syntax against common sense. Even if you paint shit yellow it's not necessarily gold. True, but I think this will mitigate a lot of the motivation Windows
devs have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D? There is no Win8GC, it's all ref counted. WinRT is COM with extras
and as such should be accessible to D. It would need some extra glue code over what we have now ... like the IInspectable interface. Really? So what's 'gcnew' for?
That's for targeting the CLR (.NET) so it doesn't conflict with new/delete in regular C++. It goes all the way back to the first C++/CLI in Visual Studio 2005. http://msdn.microsoft.com/en-****us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx> <http**://msdn.microsoft.com/en-us/**library/te3ecsc8.aspx<http://msdn.microsoft.com/en-us/library/te3ecsc8.aspx>

So there is a GC... It just happens to be the .net GC. Is that a problem? Obviously it's accessible in C++ code. Can you use it to allocate C++ objects, or is it exclusively for some sort of interaction with .net? If the rest of the platform is using it...
It's exclusively for the .NET Framework and requires the .NET Framework to be installed and loaded to run. It's the .NET Runtime, and as such, it would be VERY unwise to base anything D on it.
.NET will be a requirement on all Win8 machines. You didn't answer though, can you use the .NET GC to allocate C++ objects to use throughout your native program? Or is gcnew strictly for interfacing C++ with .NET, like C++/CLI?
Jan 25 2012
parent reply "Adam Wilson" <flyboynw gmail.com> writes:
On Wed, 25 Jan 2012 15:05:43 -0800, Manu <turkeyman gmail.com> wrote:

 On 26 January 2012 00:55, Adam Wilson <flyboynw gmail.com> wrote:

 On Wed, 25 Jan 2012 14:44:09 -0800, Manu <turkeyman gmail.com> wrote:

  On 26 January 2012 00:37, Adam Wilson <flyboynw gmail.com> wrote:
  On Wed, 25 Jan 2012 14:28:46 -0800, Manu <turkeyman gmail.com> wrote:
  On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com> wrote:

  On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com>  
 wrote:

  On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:


  On 01/25/2012 07:03 AM, Manu wrote:


  This is fairly interesting. MS have extended their C++ compiler

  significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.


  But you still have to fight with ifndef ,forward declaration,  
 and a
template syntax against common sense. Even if you paint shit yellow it's not necessarily gold. True, but I think this will mitigate a lot of the motivation Windows
devs have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D? There is no Win8GC, it's all ref counted. WinRT is COM with extras
and as such should be accessible to D. It would need some extra glue code over what we have now ... like the IInspectable interface. Really? So what's 'gcnew' for?
That's for targeting the CLR (.NET) so it doesn't conflict with new/delete in regular C++. It goes all the way back to the first C++/CLI in Visual Studio 2005. http://msdn.microsoft.com/en-****us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx> <http**://msdn.microsoft.com/en-us/**library/te3ecsc8.aspx<http://msdn.microsoft.com/en-us/library/te3ecsc8.aspx>

So there is a GC... It just happens to be the .net GC. Is that a problem? Obviously it's accessible in C++ code. Can you use it to allocate C++ objects, or is it exclusively for some sort of interaction with .net? If the rest of the platform is using it...
It's exclusively for the .NET Framework and requires the .NET Framework to be installed and loaded to run. It's the .NET Runtime, and as such, it would be VERY unwise to base anything D on it.
.NET will be a requirement on all Win8 machines. You didn't answer though, can you use the .NET GC to allocate C++ objects to use throughout your native program? Or is gcnew strictly for interfacing C++ with .NET, like C++/CLI?
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. -- Adam Wilson Project Coordinator The Horizon Project http://www.thehorizonproject.org/
Jan 25 2012
parent reply Manu <turkeyman gmail.com> writes:
On 26 January 2012 03:15, Adam Wilson <flyboynw gmail.com> wrote:

 On Wed, 25 Jan 2012 15:05:43 -0800, Manu <turkeyman gmail.com> wrote:

  On 26 January 2012 00:55, Adam Wilson <flyboynw gmail.com> wrote:
  On Wed, 25 Jan 2012 14:44:09 -0800, Manu <turkeyman gmail.com> wrote:
  On 26 January 2012 00:37, Adam Wilson <flyboynw gmail.com> wrote:

  On Wed, 25 Jan 2012 14:28:46 -0800, Manu <turkeyman gmail.com> wrote:

  On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com> wrote:


  On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com>
 wrote:


  On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:


   On 01/25/2012 07:03 AM, Manu wrote:
   This is fairly interesting. MS have extended their C++ compiler
  significantly for Windows8 with a bunch of non-standard stuff.

 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.


  But you still have to fight with ifndef ,forward declaration,
 and a

  template syntax against common sense.  Even if you paint shit
yellow it's not necessarily gold. True, but I think this will mitigate a lot of the motivation Windows devs
have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D? There is no Win8GC, it's all ref counted. WinRT is COM with extras
and as such should be accessible to D. It would need some extra glue code over what we have now ... like the IInspectable interface. Really? So what's 'gcnew' for?
That's for targeting the CLR (.NET) so it doesn't conflict with
new/delete in regular C++. It goes all the way back to the first C++/CLI in Visual Studio 2005. http://msdn.microsoft.com/en-******us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-****us/library/te3ecsc8.aspx> <ht**tp://msdn.microsoft.com/en-****us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx>

 <http**://msdn.microsoft.com/**en-us/**library/te3ecsc8.aspx<http://msdn.microsoft.com/en-us/**library/te3ecsc8.aspx>
 <**http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-us/library/te3ecsc8.aspx>

So there is a GC... It just happens to be the .net GC. Is that a problem? Obviously it's accessible in C++ code. Can you use it to allocate C++ objects, or is it exclusively for some sort of interaction with .net? If the rest of the platform is using it...
It's exclusively for the .NET Framework and requires the .NET Framework to be installed and loaded to run. It's the .NET Runtime, and as such, it would be VERY unwise to base anything D on it.
.NET will be a requirement on all Win8 machines. You didn't answer though, can you use the .NET GC to allocate C++ objects to use throughout your native program? Or is gcnew strictly for interfacing C++ with .NET, like C++/CLI?
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.
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. How about 'delegate'? Would it be trouble to make the extern ABI compatible when passing delegates between MSC++/D?
Jan 26 2012
parent reply "Adam Wilson" <flyboynw gmail.com> writes:
On Thu, 26 Jan 2012 00:30:14 -0800, Manu <turkeyman gmail.com> wrote:

 On 26 January 2012 03:15, Adam Wilson <flyboynw gmail.com> wrote:

 On Wed, 25 Jan 2012 15:05:43 -0800, Manu <turkeyman gmail.com> wrote:

  On 26 January 2012 00:55, Adam Wilson <flyboynw gmail.com> wrote:
  On Wed, 25 Jan 2012 14:44:09 -0800, Manu <turkeyman gmail.com> wrote:
  On 26 January 2012 00:37, Adam Wilson <flyboynw gmail.com> wrote:

  On Wed, 25 Jan 2012 14:28:46 -0800, Manu <turkeyman gmail.com>  
 wrote:

  On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com> wrote:


  On Wed, 25 Jan 2012 13:35:38 -0800, Manu <turkeyman gmail.com>
 wrote:


  On 25 January 2012 21:47, bls <bizprac orange.fr> wrote:


   On 01/25/2012 07:03 AM, Manu wrote:
   This is fairly interesting. MS have extended their C++ compiler
  significantly for Windows8 with a bunch of non-standard stuff.

 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.


  But you still have to fight with ifndef ,forward declaration,
 and a

  template syntax against common sense.  Even if you paint shit
yellow it's not necessarily gold. True, but I think this will mitigate a lot of the motivation Windows devs
have to seek another language if they're not developing cross platform apps. Sadly, since WinRT requires using these language extensions to interface with the new windows runtime, you won't be able to write a Windows8 app in D. Interestingly though, D supports almost everything they've added to C++. I wonder if it would be possible to do extern(Windows8) to produce a compatible ABI for linking with MS C++ apps? The most interesting features are 'ref new' and 'gcnew', which makes me wonder, since Windows8 has an OS garbage collector, would it be at all possible to have D use the Windows8 GC? I'd prefer this to using D's own GC if it would be supported, and obviously this would be a requirement if D was going to interact with WinRT properly. Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to my understanding) objects. I think I read somewhere that D already has extern(COM) no? I wonder if Windows8 ref type linkage is already technically supported in D? There is no Win8GC, it's all ref counted. WinRT is COM with extras
and as such should be accessible to D. It would need some extra glue code over what we have now ... like the IInspectable interface. Really? So what's 'gcnew' for?
That's for targeting the CLR (.NET) so it doesn't conflict with
new/delete in regular C++. It goes all the way back to the first C++/CLI in Visual Studio 2005. http://msdn.microsoft.com/en-******us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-****us/library/te3ecsc8.aspx> <ht**tp://msdn.microsoft.com/en-****us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx>

 <http**://msdn.microsoft.com/**en-us/**library/te3ecsc8.aspx<http://msdn.microsoft.com/en-us/**library/te3ecsc8.aspx>
 <**http://msdn.microsoft.com/en-**us/library/te3ecsc8.aspx<http://msdn.microsoft.com/en-us/library/te3ecsc8.aspx>

So there is a GC... It just happens to be the .net GC. Is that a problem? Obviously it's accessible in C++ code. Can you use it to allocate C++ objects, or is it exclusively for some sort of interaction with .net? If the rest of the platform is using it...
It's exclusively for the .NET Framework and requires the .NET Framework to be installed and loaded to run. It's the .NET Runtime, and as such, it would be VERY unwise to base anything D on it.
.NET will be a requirement on all Win8 machines. You didn't answer though, can you use the .NET GC to allocate C++ objects to use throughout your native program? Or is gcnew strictly for interfacing C++ with .NET, like C++/CLI?
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.
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. How about 'delegate'? Would it be trouble to make the extern ABI compatible when passing delegates between MSC++/D?
Theoretically, it wouldn't be to hard, getting Walter to do it however ... -- Adam Wilson Project Coordinator The Horizon Project http://www.thehorizonproject.org/
Jan 26 2012
parent "Daniel Murphy" <yebblies nospamgmail.com> writes:
 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.
 How about 'delegate'? Would it be trouble to make the extern ABI 
 compatible
 when passing delegates between MSC++/D?
Theoretically, it wouldn't be to hard, getting Walter to do it however ...
There probably isn't much point until dmd can produce coff and link to more of c++ anyway.
Jan 26 2012
prev sibling parent Paulo Pinto <pjmlp progtools.org> writes:
Am 25.01.2012 23:44, schrieb Manu:
 On 26 January 2012 00:37, Adam Wilson <flyboynw gmail.com
 <mailto:flyboynw gmail.com>> wrote:

     On Wed, 25 Jan 2012 14:28:46 -0800, Manu <turkeyman gmail.com
     <mailto:turkeyman gmail.com>> wrote:

         On 25 January 2012 23:59, Adam Wilson <flyboynw gmail.com
         <mailto:flyboynw gmail.com>> wrote:

             On Wed, 25 Jan 2012 13:35:38 -0800, Manu
             <turkeyman gmail.com <mailto:turkeyman gmail.com>> wrote:

               On 25 January 2012 21:47, bls <bizprac orange.fr
             <mailto:bizprac orange.fr>> wrote:


                   On 01/25/2012 07:03 AM, Manu wrote:


                       This is fairly interesting. MS have extended their
                     C++ compiler

                         significantly for Windows8 with a bunch of
                         non-standard stuff.
                         FINALLY implement garbage collection, ref
                         counting, properties,
                         delegates, events, generics, etc...
                         If other compilers adopt this tech, D loses some
                         advantages.


                     But you still have to fight with ifndef ,forward
                     declaration, and a
                     template syntax against common sense.  Even if you
                     paint shit yellow it's
                     not necessarily gold.


                 True, but I think this will mitigate a lot of the
                 motivation Windows devs
                 have to seek another language if they're not developing
                 cross platform
                 apps.

                 Sadly, since WinRT requires using these language
                 extensions to interface
                 with the new windows runtime, you won't be able to write
                 a Windows8 app in
                 D.
                 Interestingly though, D supports almost everything
                 they've added to C++. I
                 wonder if it would be possible to do extern(Windows8) to
                 produce a
                 compatible ABI for linking with MS C++ apps?

                 The most interesting features are 'ref new' and 'gcnew',
                 which makes me
                 wonder, since Windows8 has an OS garbage collector,
                 would it be at all
                 possible to have D use the Windows8 GC? I'd prefer this
                 to using D's own
                 GC
                 if it would be supported, and obviously this would be a
                 requirement if D
                 was going to interact with WinRT properly.
                 Also, WinRT uses 'ref new' to allocate ref counted
                 (effectively COM to my
                 understanding) objects. I think I read somewhere that D
                 already has
                 extern(COM) no? I wonder if Windows8 ref type linkage is
                 already
                 technically supported in D?


             There is no Win8GC, it's all ref counted. WinRT is COM with
             extras and as
             such should be accessible to D. It would need some extra
             glue code over
             what we have now ... like the IInspectable interface.


         Really? So what's 'gcnew' for?


     That's for targeting the CLR (.NET) so it doesn't conflict with
     new/delete in regular C++. It goes all the way back to the first
     C++/CLI in Visual Studio 2005.
     http://msdn.microsoft.com/en-__us/library/te3ecsc8.aspx
     <http://msdn.microsoft.com/en-us/library/te3ecsc8.aspx>


 So there is a GC... It just happens to be the .net GC. Is that a
 problem? Obviously it's accessible in C++ code. Can you use it to
 allocate C++ objects, or is it exclusively for some sort of interaction
 with .net?
 If the rest of the platform is using it...
You are mixing it. Managed C++ was the first set of C++ extensions that target .NET. This was only part of .NET 1.x. Experience showed that the extensions were not well thought out, and with the release of .NET 2.0, Microsoft introduced C++/CLI, while dropping support for Managed C++. Both generate CLR bytecodes and make use of the .NET GC as well. C++/CX is the new set of extensions and they target native code. Besides the standard C++ code, there is support for a COM based object model, which is referenced counted. This is done via a new type, handles, which call COM AddRef()/Release() under the hood. -- Paulo
Jan 25 2012
prev sibling parent Paulo Pinto <pjmlp progtools.org> writes:
Am 25.01.2012 22:35, schrieb Manu:
 On 25 January 2012 21:47, bls <bizprac orange.fr
 <mailto:bizprac orange.fr>> wrote:

     On 01/25/2012 07:03 AM, Manu wrote:

         This is fairly interesting. MS have extended their C++ compiler
         significantly for Windows8 with a bunch of non-standard stuff.
         FINALLY implement garbage collection, ref counting, properties,
         delegates, events, generics, etc...
         If other compilers adopt this tech, D loses some advantages.


     But you still have to fight with ifndef ,forward declaration, and a
     template syntax against common sense.  Even if you paint shit yellow
     it's not necessarily gold.


 True, but I think this will mitigate a lot of the motivation Windows
 devs have to seek another language if they're not developing cross
 platform apps.

 Sadly, since WinRT requires using these language extensions to interface
 with the new windows runtime, you won't be able to write a Windows8 app
 in D.
 Interestingly though, D supports almost everything they've added to C++.
 I wonder if it would be possible to do extern(Windows8) to produce a
 compatible ABI for linking with MS C++ apps?

 The most interesting features are 'ref new' and 'gcnew', which makes me
 wonder, since Windows8 has an OS garbage collector, would it be at all
 possible to have D use the Windows8 GC? I'd prefer this to using D's own
 GC if it would be supported, and obviously this would be a requirement
 if D was going to interact with WinRT properly.
 Also, WinRT uses 'ref new' to allocate ref counted (effectively COM to
 my understanding) objects. I think I read somewhere that D already has
 extern(COM) no? I wonder if Windows8 ref type linkage is already
 technically supported in D?
It is an extension of the COM model. There is a new COM interface that extends IUnknown, which provides a reflection API. Everything is explained in the BUILD 2011 videos, http://channel9.msdn.com/Events/BUILD/BUILD2011?sort=sequential&direction=desc&term=&t=c%2B%2B Many of the new ideas are actually based on what Delphi together with C++ Builder and VCL already provided. Anyway this goes to show that eventually all system programming languages will have GC or Refcounted memory management. As I already mentioned here a few times when memory management discussions pop up. -- Paulo
Jan 25 2012
prev sibling parent Paulo Pinto <pjmlp progtools.org> writes:
Am 25.01.2012 20:47, schrieb bls:
 On 01/25/2012 07:03 AM, Manu wrote:
 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.
But you still have to fight with ifndef ,forward declaration, and a template syntax against common sense. Even if you paint shit yellow it's not necessarily gold.
Worse is Better: http://en.wikipedia.org/wiki/Worse_is_better
Jan 25 2012
prev sibling next sibling parent reply Trass3r <un known.com> writes:
 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
Yeah, while refusing to implement most of C++11.
Jan 25 2012
next sibling parent reply Manu <turkeyman gmail.com> writes:
On 25 January 2012 23:33, Trass3r <un known.com> wrote:

 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
Yeah, while refusing to implement most of C++11.
Good! The C++11 committee should be shot. They've got it completely wrong, and MS have it right for my money! :) I don't want MORE STL, I want less :)
Jan 25 2012
parent Trass3r <un known.com> writes:
 Good! The C++11 committee should be shot. They've got it completely  
 wrong, and MS have it right for my money! :)
 I don't want MORE STL, I want less :)
member initializers.
Jan 25 2012
prev sibling next sibling parent Brad Anderson <eco gnuk.net> writes:
On Wed, Jan 25, 2012 at 2:38 PM, Manu <turkeyman gmail.com> wrote:

 On 25 January 2012 23:33, Trass3r <un known.com> wrote:

  This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
Yeah, while refusing to implement most of C++11.
Good! The C++11 committee should be shot. They've got it completely wrong, and MS have it right for my money! :) I don't want MORE STL, I want less :)
Herb Sutter (the man speaking in your video) is chairman of the C++ standards committee so it's kind of amusing that the stuff you praise and the stuff you say is wrong are both led by the same man. Also, he and Andrei wrote a book together (C++ Coding Standards) so the name drop isn't entirely unexpected. They do the C++ and Beyond conference together (with Scott Meyers). A large portion of the questions from the attendees I saw in the Channel 9 videos were about D. It's kind of sad to see Microsoft doing so much work in interesting areas with C++ that I won't get to use because it's proprietary (AMP, for instance). Regards, Brad Anderson
Jan 25 2012
prev sibling next sibling parent reply Paulo Pinto <pjmlp progtools.org> writes:
Am 25.01.2012 22:33, schrieb Trass3r:
 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
Yeah, while refusing to implement most of C++11.
To be fair, they did implement a big part of the library. But I do share your opinion here. I hate the way that Microsoft cherry picks the C and C++ standards, only implement the parts that they feel like, while adding Windows specific extensions. When the other vendors were busy making their compilers C++98 compliant, Microsoft was adding COM programming extensions. Since 2002, the Visual C++ team has spent resources developing Managed C++, C++/CLI and now C++/CX, besides the XBox backends and C++ standard efforts. How much more standards compliant wouldn't Visual C++ be, if Microsoft would be more standards friendly. Still these are business decisions. -- Paulo
Jan 25 2012
parent Trass3r <un known.com> writes:
 Yeah, while refusing to implement most of C++11.
To be fair, they did implement a big part of the library.
I care more about long overdue language changes like non-static member initializers.
 But I do share your opinion here. I hate the way that Microsoft
 cherry picks the C and C++ standards, only implement the parts
 that they feel like, while adding Windows specific extensions.
Exactly.
Jan 25 2012
prev sibling parent reply Manu <turkeyman gmail.com> writes:
On 26 January 2012 00:02, Brad Anderson <eco gnuk.net> wrote:

 On Wed, Jan 25, 2012 at 2:38 PM, Manu <turkeyman gmail.com> wrote:

 On 25 January 2012 23:33, Trass3r <un known.com> wrote:

  This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
Yeah, while refusing to implement most of C++11.
Good! The C++11 committee should be shot. They've got it completely wrong, and MS have it right for my money! :) I don't want MORE STL, I want less :)
Herb Sutter (the man speaking in your video) is chairman of the C++ standards committee so it's kind of amusing that the stuff you praise and the stuff you say is wrong are both led by the same man. Also, he and Andrei wrote a book together (C++ Coding Standards) so the name drop isn't entirely unexpected. They do the C++ and Beyond conference together (with Scott Meyers). A large portion of the questions from the attendees I saw in the Channel 9 videos were about D.
Haha really? Amazing, but he works for Microsoft then I guess? So why is he fixing C++ for MS, but won't fix the C++ standard its self? std::function for instance, why add that if he turns around and adds a proper keyword for MS? It's kind of sad to see Microsoft doing so much work in interesting areas
 with C++ that I won't get to use because it's proprietary (AMP, for
 instance).
/agree ... but maybe enough people might demand some of those features in GCC, and it could bleeds across...
Jan 25 2012
parent reply Paulo Pinto <pjmlp progtools.org> writes:
Am 25.01.2012 23:35, schrieb Manu:
 On 26 January 2012 00:02, Brad Anderson <eco gnuk.net
 <mailto:eco gnuk.net>> wrote:

     On Wed, Jan 25, 2012 at 2:38 PM, Manu <turkeyman gmail.com
     <mailto:turkeyman gmail.com>> wrote:

         On 25 January 2012 23:33, Trass3r <un known.com
         <mailto:un known.com>> wrote:

                 This is fairly interesting. MS have extended their C++
                 compiler
                 significantly for Windows8 with a bunch of non-standard
                 stuff.


             Yeah, while refusing to implement most of C++11.


         Good! The C++11 committee should be shot. They've got it
         completely wrong, and MS have it right for my money! :)
         I don't want MORE STL, I want less :)


     Herb Sutter (the man speaking in your video) is chairman of the C++
     standards committee so it's kind of amusing that the stuff you
     praise and the stuff you say is wrong are both led by the same man.
     Also, he and Andrei wrote a book together (C++ Coding Standards) so
     the name drop isn't entirely unexpected.  They do the C++ and Beyond
     conference together (with Scott Meyers).  A large portion of the
     questions from the attendees I saw in the Channel 9 videos were about D.


 Haha really? Amazing, but he works for Microsoft then I guess? So why is
 he fixing C++ for MS, but won't fix the C++ standard its self?
 std::function for instance, why add that if he turns around and adds a
 proper keyword for MS?
Because he is just one person in the standards process. That is how standards work. Each person (or company) just gets one vote.
Jan 25 2012
next sibling parent Manu <turkeyman gmail.com> writes:
On 26 January 2012 00:48, Paulo Pinto <pjmlp progtools.org> wrote:

 Am 25.01.2012 23:35, schrieb Manu:

 On 26 January 2012 00:02, Brad Anderson <eco gnuk.net

 <mailto:eco gnuk.net>> wrote:

    On Wed, Jan 25, 2012 at 2:38 PM, Manu <turkeyman gmail.com
    <mailto:turkeyman gmail.com>> wrote:

        On 25 January 2012 23:33, Trass3r <un known.com
        <mailto:un known.com>> wrote:

                This is fairly interesting. MS have extended their C++
                compiler
                significantly for Windows8 with a bunch of non-standard
                stuff.


            Yeah, while refusing to implement most of C++11.


        Good! The C++11 committee should be shot. They've got it
        completely wrong, and MS have it right for my money! :)
        I don't want MORE STL, I want less :)


    Herb Sutter (the man speaking in your video) is chairman of the C++
    standards committee so it's kind of amusing that the stuff you
    praise and the stuff you say is wrong are both led by the same man.
    Also, he and Andrei wrote a book together (C++ Coding Standards) so
    the name drop isn't entirely unexpected.  They do the C++ and Beyond
    conference together (with Scott Meyers).  A large portion of the
    questions from the attendees I saw in the Channel 9 videos were about
 D.


 Haha really? Amazing, but he works for Microsoft then I guess? So why is
 he fixing C++ for MS, but won't fix the C++ standard its self?
 std::function for instance, why add that if he turns around and adds a
 proper keyword for MS?
Because he is just one person in the standards process. That is how standards work. Each person (or company) just gets one vote.
Yeah, well the chairman should have veto rights, and then do it right, like they did at MS :P
Jan 25 2012
prev sibling parent Brad Anderson <eco gnuk.net> writes:
On Wed, Jan 25, 2012 at 3:53 PM, Manu <turkeyman gmail.com> wrote:

 On 26 January 2012 00:48, Paulo Pinto <pjmlp progtools.org> wrote:

 Am 25.01.2012 23:35, schrieb Manu:

 On 26 January 2012 00:02, Brad Anderson <eco gnuk.net

 <mailto:eco gnuk.net>> wrote:

    On Wed, Jan 25, 2012 at 2:38 PM, Manu <turkeyman gmail.com
    <mailto:turkeyman gmail.com>> wrote:

        On 25 January 2012 23:33, Trass3r <un known.com
        <mailto:un known.com>> wrote:

                This is fairly interesting. MS have extended their C++
                compiler
                significantly for Windows8 with a bunch of non-standard
                stuff.


            Yeah, while refusing to implement most of C++11.


        Good! The C++11 committee should be shot. They've got it
        completely wrong, and MS have it right for my money! :)
        I don't want MORE STL, I want less :)


    Herb Sutter (the man speaking in your video) is chairman of the C++
    standards committee so it's kind of amusing that the stuff you
    praise and the stuff you say is wrong are both led by the same man.
    Also, he and Andrei wrote a book together (C++ Coding Standards) so
    the name drop isn't entirely unexpected.  They do the C++ and Beyond
    conference together (with Scott Meyers).  A large portion of the
    questions from the attendees I saw in the Channel 9 videos were about
 D.


 Haha really? Amazing, but he works for Microsoft then I guess? So why is
 he fixing C++ for MS, but won't fix the C++ standard its self?
 std::function for instance, why add that if he turns around and adds a
 proper keyword for MS?
Because he is just one person in the standards process. That is how standards work. Each person (or company) just gets one vote.
Yeah, well the chairman should have veto rights, and then do it right, like they did at MS :P
The chairman in ISO committees is more of an organizer and planner. The process itself is very democratic. The final vote is done by member countries and the standard becomes an international treaty. As for why he didn't fix things, in addition to the fact that the committee probably disagrees with some of the stuff you would call broken, the C++0x (heh) standard was already taking way, way too long. They had to cut the largest addition out (concepts) because the standard would have taken years longer to realize had they tried to keep it. I believe they've taken steps to make sure the next standard happens in a more timely fashion. Regards, Brad Anderson
Jan 25 2012
prev sibling next sibling parent "F i L" <witte2008 gmail.com> writes:
Is this open source and a benefit to developers writing for 
non-MS platforms? Nope. Then sorry MS, but I hardly care.
Jan 25 2012
prev sibling parent reply =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <xtzgzorex gmail.com> writes:
On 25-01-2012 16:03, Manu wrote:
 http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-532T

 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.
Most of this is only available in C++/CLI. And for the record, C++/CLI tooling in VS is horrendous.
 Oh, and Andrei got a nice little name drop around 35 minutes ;)
- Alex
Jan 25 2012
parent Paulo Pinto <pjmlp progtools.org> writes:
Am 26.01.2012 00:58, schrieb Alex Rønne Petersen:
 On 25-01-2012 16:03, Manu wrote:
 http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-532T

 This is fairly interesting. MS have extended their C++ compiler
 significantly for Windows8 with a bunch of non-standard stuff.
 FINALLY implement garbage collection, ref counting, properties,
 delegates, events, generics, etc...
 If other compilers adopt this tech, D loses some advantages.
Most of this is only available in C++/CLI. And for the record, C++/CLI tooling in VS is horrendous.
No, it is also available in C++/CX. It is new in Windows 8/Visual Studio 2011.
Jan 25 2012