comp.lang.ada
 help / color / mirror / Atom feed
From: Rob Veenker <veenker@xs4all.nl>
Subject: Re: GNAT Pro for .NET
Date: Tue, 25 Nov 2008 00:07:35 +0100
Date: 2008-11-25T00:07:35+01:00	[thread overview]
Message-ID: <492b33ba$0$200$e4fe514c@news.xs4all.nl> (raw)
In-Reply-To: e3f203cc-bcf6-476b-b62d-eaba95eba151@j35g2000yqh.googlegroups.com

george.priv@gmail.com wrote:

> On Nov 23, 11:36 am, Rob Veenker <veen...@xs4all.nl> wrote:
>> You may want to check out the MGNAT project
>> athttp://sourceforge.net/projects/asharp
>>
>> The GNAT Pro for .Net compiler used this project as a starting point.
>>
>> The compiler is kept in sync with the latest GNAT Pro compiler technology
>> but there are limitations when it comes to code generation (due to .Net
>> runtime). Also note that not all annexes are implemented.
>>
>> You need to be aware of the way the Ada symbols (variables, procedures,
>> functions etc.) are expressed in MSIL if you want to create Ada
>> assemblies that will be used by other .Net languages. Using a .Net
>> reflection tool or the object browser can be of great help.
>>
>> Integration in the MS Visual Studio is great for debugging a mixed
>> language application, but for my Ada programming I still use GPS :-)
>>
>> Regards,
>> Rob Veenker
>>
>> george.p...@gmail.com wrote:
>> > Wonder if anyone has any experience with Ada .NET?  How well it is
>> > integrated and what are the major issues you had with it?
>>
>>
> 
> Thanks, Rob.  I've tried that, but there are some strange things in
> the way Ada objects behave and with lack of documentation it's hard to
> figure out.  In particular:
> - Is it possible to mix native code from Ada with MSIL (like we do C++/
> C# mix)?

I have not tested the integration in passing Ada objects but there is a way of extending MSIL classes using Ada. I believe there is even a tutorial on this.
To be able to call 'native' Ada code I still rely on the MS COM+ interface using GNATCOM and wrap this native COM object using interop services :-)
But you can also use pragma import / export ! 

> - I was unable to get Initialize/Finalize being called for
> Ada.Finalization.Controlled objects (given that destruction of objects
> in .NET are non-deterministic, but still).
> - Compiler won't let me implement IDisposable interface, am I looking
> at right place (MSSyst.IDisposable)?

Have a look at the extend_dotnet_class tutorial. Here the MSSyst.IDisposible is indeed used as well. But the object is created outside of Ada.
Which version of Ada for .Net are you using? There should be something on this subject in the documentation as well.

> 
> Thanks,
> 
> George Privalov.

Regards,
Rob Veenker




  reply	other threads:[~2008-11-24 23:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22 19:51 GNAT Pro for .NET george.priv
2008-11-23 16:36 ` Rob Veenker
2008-11-24 15:44   ` george.priv
2008-11-24 23:07     ` Rob Veenker [this message]
2008-11-28  4:20       ` george.priv
2008-11-30 11:40         ` Rob Veenker
2008-11-26  7:05 ` Brad Moore
2008-11-29 20:07   ` george.priv
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox