Florian Klaempfl <flor...@freepascal.org>: > Vinzent Höfler schrieb: > > Florian Klaempfl <flor...@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. > > Doing/allowing unsafe implicit type casts is neither in the spirit of > pascal.
You wouldn't *need* typecasts. It's a pointer and the instance it is pointing to will be initialized by the subroutine you're calling. And that one *knows* the size of the class it created. So there's typecast involved at all, if used correctly. And stop calling me clueless, please. Just because you do not understand what I write, doesn't exactly mean, I am the one who has no clue. Vinzent. -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel