D vs. C#

Vladimir Panteleev thecybershadow at gmail.com
Mon Oct 22 14:57:27 PDT 2007


On Tue, 23 Oct 2007 00:39:51 +0300, Walter Bright <newshound1 at digitalmars.com> wrote:

> Vladimir Panteleev wrote:
>> On Mon, 22 Oct 2007 21:41:26 +0300, Vladimir Panteleev
>> <thecybershadow at gmail.com> wrote:
>>
>>> On Mon, 22 Oct 2007 21:22:50 +0300, Walter Bright
>>> <newshound1 at digitalmars.com> wrote:
>>>
>>>> Except that .net cannot talk to C or C++ code, which are the
>>>> usual languages for applications.
>>> .NET (at least C#) can call native code in DLLs. Unlike Java, you
>>> can also define the exact layout of structures, and thus share data
>>> structures with native code.
>>
>> Here's some documentation on it:
>> http://msdn2.microsoft.com/en-us/library/aa288468(VS.71).aspx
>>
>> Note that you can also specify one of several calling conventions:
>> Cdecl, Stdcall, Thiscall (which allows some basic OOP simulation) and
>> Winapi (same as Stdcall on Windows).
>>
>
> Thanks for the reference. It says that the parameters must go through
> "marshalling", which means they go through a translation layer.

Quite so - I hope the JIT compiler generates proper optimal native code, though.

(sorry, saw the e-mail reply before the NG reply)

-- 
Best regards,
 Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list