Le 04/12/2010 10:00, Franciszek Czekala a écrit :
Anyway, if struct has value semantics then perhaps the argument to
opEquals should have simply 'in' mode? In Ada95 the 'in' mode of
the arguments does not determine how the arguments are passed
internally to the function. The compiler can choose to pass them
by value or by reference as suitable. Since the 'in' mode makes
the arguments constant inside, it does not really matter how the
arguments are passed, so why burden the user with this knowledge?

Hi,
I am certainly not expert enough to estimate what the consequences such a change would be for the existing code base, but I really appreciate
this idea.

I suppose a potential problem would be when trying to link code written by different compilers together. In such a scenario, "how the arguments are passed" matters. But I don't know any bit of Ada and don't have a clue about they solved this issue.

Cheers,

Olivier.

Reply via email to