[haiku-development] Re: Ada Compiler?

  • From: Patrick Kelly <kameo76890@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 6 Sep 2009 17:31:17 -0400

On Sep 6, 2009, at 4:59 PM, Ryan Leavengood wrote:

> On Sun, Sep 6, 2009 at 4:19 PM, Patrick Kelly<kameo76890@xxxxxxxxx>  
> wrote:
>>
>> C is basically C++, but yes.
>
> That's a pretty bold statement :)

Well were is the fun in being bland, haha. GNAT does have C++  
bindings, I do believe I said that. Although C++ is not part of the  
current spec (2005) the GNAT compiler does include this.

>
> If Ada only can bind with C, it really won't be able to bind to C++.
> The name mangling alone is quite different, besides other issues such
> as constructors, destructors, virtual functions, operator overloading,
> templates, etc.
>
> It would probably be possible to build a C API wrapper around the C++
> and then call that from Ada, but it would be a lot of work.
>
>> I don't quite see why the API would have to stabilize for GCCv4 but
>> not for GCCv2, does v2 magically make the API more stable.
>
> Well yes in fact it does, though not by magic. Haiku has promised to
> keep API compatibility with BeOS R5 for Haiku R1. Since there was no
> GCC4 on BeOS there is no need to maintain backwards compatibility for
> that compiler. In addition anything compiled with GCC2 cannot be used
> with GCC4 and vise versa, because the name mangling was changed
> between those compilers. That means that we have more room to change
> the API in the future for GCC4 because no promise of backwards
> compatibility has been made, and recompiling would be needed either
> way to create a GCC4 Haiku application.

Not entirely correct. Haiku promised Binary compatibility with BeOS.  
The issues with using GCCv4, is that there is still Source  
compatibility, but no more Binary. If you need an example, I'd suggest  
checking out some of the AROS mailing lists, they'd be happy to  
explain in full detail. Compatibility between major versions has to do  
more with not caring about backwards compatibility. API's are changed  
(mangled as you said) rather than added.

>
>> I just believe with all that Ada's proven itself by,
>> why not make it easier for Ada developers to code for Haiku.
>
> In the future I think we all would like to have decent bindings for
> various languages that can be used to code for Haiku. I'm partial to
> scripting languages like Ruby and Python, though I'm open to
> alternatives (obviously since I'm a Haiku developer) and will take a
> look at Ada.

I know someone has developed a 95 compliant interpreter for Ada. I  
seem to have lost the name (not a fan of scripting, JIT suits me  
better). This might be a good starting point though
http://www.pegasoft.ca/bush.html
by everything I've seen, BUSH is mostly compliant, my guess is just  
some extra packages have been 'added'/'dropped'

>
> Anyhow my point is that once more of an infrastructure develops for
> these other language bindings, maybe they could be included with
> Haiku. But for now they don't exist or are incomplete, so I don't
> think it makes sense to try to include unused tools with Haiku. It
> isn't that hard to add things after install anyhow (well it could be
> improved, and will be in the future.)

I wasn't looking for it to be included while still lacking stability,  
believe me, I think it's safe to say I think fondly of Ada, and part  
of that fondness is the strong understanding of instability and what  
damage it can cause. I was mostly interested in just some way to  
include an Ada compiler, and the thoughts of the Dev's on the subject.
>
> -- 
> Regards,
> Ryan
>




Other related posts: