[fpc-devel] Parameters must match exactly?

"Vinzent Höfler" JeLlyFish.software at gmx.net
Mon May 17 22:59:35 CEST 2010


Florian Klaempfl <florian at freepascal.org>:

> Graeme Geldenhuys schrieb:
>
> > This compiler change will play havoc on the Simple Factory Method design
> > pattern as well - a base class is used as the parameter type, but
> > descendants are created and passed back. This is a very common case and
> > used a lot.
> 
> ... and one uses normally a function and not a var/out parameter.

And return the error code in an out parameter instead? Great idea. So readable. So much in the spirit of Pascal.

Any more such suggestions on how to write code? Where can one download "Florian's Style Guide" - so one will not do that mistake again?

Sorry for the sarcasm, but that pattern worked in the past and there's absolutely no reason it shouldn't. Come on, guys, that's really schizophrenic: On one hand such changes break compatibility in a BIG way and on the other hand there's whining about adding a new keyword, because it could break compatibility in a couple of rare cases.


Vinzent.
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



More information about the fpc-devel mailing list