[fpc-devel] Parameters must match exactly?
jonas.maebe at elis.ugent.be
Wed May 19 10:26:07 CEST 2010
On 19 May 2010, at 03:35, Vinzent Höfler wrote:
> Jonas Maebe <jonas.maebe at elis.ugent.be>:
>> Then again, for
>> some 10 or more years nobody thought of how the old behaviour allowed
>> subverting the complete type checking model of the compiler either
>> (which is why "useless restriction from Delphi" probably wasn't
>> implemented initially).
> Well, wouldn't it be more precise, instead of disallowing "non-
> matching" out-parameters, issue a warning if the "out" parameter is
> read before written the first time instead? The compiler should
> issue a "possibly uninitialized" warning, anyway. ;)
It already does.
Maybe someone should ask a question on the Embarcadero forums asking
why the *safe variant* is forbidden (not why it is forbidden in
general), in case that's still true for current Delphi versions. It
would be useful to have their feedback before we set ourselves up for
enabling and later on disabling this again.
More information about the fpc-devel