On Tue, Jan 3, 2012 at 11:26 AM, Skybuck Flying <skybuck2...@hotmail.com> wrote: > > > -----Original Message----- From: Hans-Peter Diettrich > Sent: Tuesday, January 03, 2012 14:56 > To: FPC developers' list > Subject: Re: [fpc-devel] Pointer cache for fast class/pointer access. > > > Skybuck Flying schrieb: > >> vValue := mDepth1.mDepth2.mDepth3.mValue; > > > " > You can implement such a funny hierarchy in any language. So what? > " > > For the performance of the line of code above it matters if TObject or > Object is used. > > Or as somebody else mentioned: object vs class.
I said that. ;-) > I could give a full test program which illustrates it ;) (It's kinda big > though, a generator). > > But if you know anything about assembler you should be able to figure that > stuff out yourself ?!? ;) :) > > But perhaps you more of a "parser/text guy" and less of an "assembly/binary > guy" ? ;) > > Anyway what remains is the question: what's different between object and > class or Tobject and object when it comes to capabilities. > > Also the slightly different syntax is kinda a shame... this would make it a > little bit difficult to flip/flop between different "object models". > > Flexible software is nice for when requirements change so it would be nice > if changing object model would be easy to do to a certain degree ;) > > For example: > > MyClass := TMyClass.Create; > > versus > > MyObject.Create; > > ^ Why this difference ? It makes it less flexible to flip/flop :( TMyClass.Create: this is a call to the class constructor. MyObject.Create: this is a call to a method. Object type is (very) older than Class type and I don't think the core team wanted some similarity between Object and Class types. Everybody prefer classes so, the Object type was forgotten. I thinking if the Object type will be deprecated in the future... I hope not. Marcos Douglas _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel