[GAP] Question about subprogram syntax

Robert Dewar dewar at adacore.com
Wed Feb 22 12:55:46 CET 2006


Marius Amado Alves wrote:

> OTOH I don't see how adding empty brackets as an option to the language 
> would create incompatibility. Ada does not have any construct "()" does 
> she?

It would not be incompatible, and the obvious rule would be
that it is a real part of the function spec, so that if the
function spec has () then calls must also have ().

Whether this is desirable is of course arguable.

> Of course this is academic, or at most Ada 2015 stuff.

Nothing forbids adding extensions to Ada (that's what the -gnatX
switch in GNAT is about). Martin Carlisle added a version of the
prefix call notation before Ada 2005 did.

So if you really like this feature, take advantage of the free licensing
and availability of sources, and add the feature to GNAT :-)
> 
> Anyway, even if technically feasible, this change (as an option) would 
> create the potential for two styles, and that might hurt readability 
> across teams a bit.

Or within a team, consistency is VERY important
> 
> Goes without saying that making () mandatory is unthinkable, as 
> compatibility is infinitely higher in Ada requirements than getting a C 
> looks.

Yes of course.



More information about the GAP mailing list