[GAP] Question about subprogram syntax
Franco Mazzanti
mazzanti at isti.cnr.it
Wed Feb 22 11:30:53 CET 2006
>On Tue, 21 Feb 2006, Diego Alonso Cáceres wrote:
>
>I'm not an expert but my understanding was that
>this is considered a feature. The idea is that
>it is possible to replace a constant with a
>parameterless function without editing any code
>that uses that constant.
>
> A := B;
>
>B might be a value today, but a parameterless
>function tomorrow. This might be useful, for
>example, when it becomes necessary to do some
>significant computation to obtain the desired
>value.
>
>I don't know how often this actually comes up in the wild, though.
>
Peter
I believe that the possibility of omitting empty
parenthesis in function call is one of the nice
features of Ada.
Nevertheless, forbidding them might also be considered a little excessive.
For example, I would be happy if I had the possibility of writing:
A := B(); -- suggesting the meaning:
-- "WARNING: function B has potentially relevant side effects!!
I.e. REQUIRING parethesis is undesirable and backword incompatible,
ALLOWING parenthesis might be desirable.
Franco
--
--
Franco Mazzanti
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
Area della Ricerca CNR di Pisa
--
More information about the GAP
mailing list