[fpc-devel] Pointer cache for fast class/pointer access.

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Jan 5 12:03:14 CET 2012


Marcos Douglas schrieb:

>> I don't see any reason why the Object type should be dropped. It's close
>> to C++ objects, useful in porting code. It allows for static objects,
>> e.g. in the stack, while TObject is bound to the heap (without tricks).
> 
> So, Object types is indicated only for compatibility?
> In your opinion, for the atual code, we have some benefit using Object
> (stack) instead Class (heap)?

Delphi (now) provides Records with methods, but these lack inheritance. 
Why introduce such a crippled construct, when Objects can do the same 
and more (virtual methods...).

>> I used Object types to e.g. emulate C bitfields, with a simple typecast of a
>> variable into the according object...
> 
> What is bitfields?

C bitfields are parts of some integral type variable, with each field 
spanning one or more bits. They allow to e.g. subdivide DWORD 
parameters, which consist of several parts (combined with OR).

DoDi




More information about the fpc-devel mailing list