D vs C++

Jimmy Cao jcao219 at gmail.com
Tue Dec 28 00:35:06 PST 2010


On Mon, Dec 27, 2010 at 11:58 AM, bearophile <bearophileHUGS at lycos.com>wrote:

>  we could type with a few additional keystrokes:
>
> COMObj objDoc = COMObj.create("Word.Application");
> objDoc.invoke("Open", new COMData[] { new COMString(strFilename) };
>
>
Now that it's been mentioned, dynamic typing abilities within D would be
something awesome.  C# has already gotten it in 4.0.
Take a look:

dynamic wordapp = new Word.Application();

dynamic doc = wordapp.Documents.Open(FileName: "MyDoc.docx");


100% valid C#.  Made possible with the Dynamic Language Runtime.

Take a look at the IronPython project (which I have an amount experience
with) initially sponsored by Microsoft (which later dropped its support).
It's basically a Python compiler written in C# targeting the Dynamic
Language Runtime. C# calling Python and the other way around seamlessly,
pretty much.  C# being able to reference  Python assemblies. Python in
ASP.NET and Silverlight.  It is awesome (still a community project right
now, it's still going on without Microsoft's official support).

Anyways, dynamic typing abilities in D would be very nice, and it opens up
quite a number possibilities.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101228/e6b90a73/attachment.html>


More information about the Digitalmars-d mailing list