comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Making the same mistake as the broken C interface to fortran
Date: Wed, 3 Jul 2019 14:02:43 -0500
Date: 2019-07-03T14:02:43-05:00	[thread overview]
Message-ID: <qfiu4j$oaq$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 2uYSE.298383$sJ3.119314@fx04.am4

"Chris M Moore" <zmower@ntlworld.com> wrote in message 
news:2uYSE.298383$sJ3.119314@fx04.am4...
...
> So the question is do we break the API or not?

That's not the question. The question is ensuring that the Ada compiler 
properly implements the Fortran convention. If it does, then the API doesn't 
change. And if it doesn't, then fix the silly compiler (or get a different 
one that does the right thing). The Annex B "Implementation Advice" 
(specifically, B.5(22-26)) is very close to a requirement, in that the 
interface is not useful if one can't depend on the mapping.

If your worrying about what hack to use to make a broken compiler work 
(hopefully only because you need an immediate solution), the answer ought to 
be that no one cares -- do whatever makes sense. Because no one should be 
*requiring* an Ada compiler to do the wrong thing, so when the bug is 
ultimately fixed, you'll have to revert to some version of the original API. 
(That to me suggests using a thicker binding -- which is always preferable 
anyway IMHO -- raw C or Fortran interfaces don't make good Ada libraries.)

BTW, I note that type Fortran_Character is in fact an array type, so that 
could be confusing some readers of the API (it surely would have confused 
me).

                                                     Randy.












We could make the
> bindings thicker and thus slower.  Or break the typing and force client 
> software to change.  The software engineer in me says the former but I'm 
> not a user of this API so I doubt my views count for much.
>
> -- 
> sig pending (since 1995) 


  reply	other threads:[~2019-07-03 19:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 23:33 Making the same mistake as the broken C interface to fortran Chris M Moore
2019-07-02 20:57 ` Simon Wright
2019-07-03  7:06   ` Chris M Moore
2019-07-03 19:02     ` Randy Brukardt [this message]
2019-07-03 21:31       ` Chris M Moore
2019-07-04  8:38         ` Simon Wright
2019-07-05 13:49           ` Chris M Moore
2019-07-05 17:44             ` Simon Wright
2019-07-07 16:33               ` Chris M Moore
replies disabled

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