On 19 May 2010, at 03:35, Vinzent Höfler wrote:

Jonas Maebe <[email protected]>:

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.


Jonas_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to