On Thu, Jan 5, 2012 at 8:03 AM, Hans-Peter Diettrich <[email protected]> wrote: > 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...).
+1 But more about Object type, what do you think to use Object to group routines instead of using procedure/functions, as a 'namespace' to not use the unit name as a prefix? Anyone else? >>> 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). Thanks for clarification. Marcos Douglas _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
