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

Paulo Pinto pjmlp at progtools.org
Wed Jan 25 14:02:38 PST 2012


Am 25.01.2012 22:35, schrieb Manu:
> On 25 January 2012 21:47, bls <bizprac at orange.fr
> <mailto:bizprac at 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


More information about the Digitalmars-d mailing list