[Lazarus] Troubles with 0.9.29

Sven Barth pascaldragon at googlemail.com
Sat Oct 23 17:40:15 CEST 2010


On Fri, Oct 22, 2010 at 01:14:29PM +0200, Graeme Geldenhuys wrote:
> > application that uses records with methods.
> 
> Side Note:
> I still don't get why Borland/Embarcadero did that... records with methods.
> MvC hinted that it is because .Net has records with methods. But delphi
> Objects do exactly that, and existed since Turbo Pascal days. In terms of
> Delphi, what exactly is the difference between a "record with methods" and
> a Object?

Not so much for .NET, but for the emulation of .NET features. Several of
these are based on duck typing like functionatily where the compiler
searches for "magical" function names.

I think they didn't pick the object type because it also supports VMTs, a
feature that complicates resolving methods, and considerably complicating
those features.  TP Tobject can magically gain a VMT when a virtual method
is used.





More information about the Lazarus mailing list