It - super lightweight old school objects - won't be cut out of the language any time soon.
And TObject is already the root object. It is currently very light weight, although that might change.
Maybe you can explain what you really want to achieve? For some scenarios there are some options.
For example, although the constructor for TObject is non-virtual, so it basically always called, it is possible to hide it, so it is never called. I posted on this forum about how to do that some years ago.
A bidirectional list of arbitrary elements.
But not through dynamic arrays, as usual, but with classic algorithm with fast insertion and deletion, which arrays don't provide and at many thousands of elements they start to slow down, so I had to give them up...
The standard algorithm, as per the textbook, works very well (even amazingly) in terms of speed and uses "record" types.
It's like this.
PBDIthem = ^TBDIthem;
TBDIthem = record
Data: byte; // Anything here
Prev, Next: PBDIthem;
Create procedure;
procedure Done;
end;
TBDList = record
public
FirstPtr: PBDIthem;
EndPtr: PBDIthem;
CurrentList: PBDIthem;
Len: nativeuint;
Current: nativeuint;
Create procedure;
Done procedure;
procedure IncCurrent(Count: nativeuint);
-*-*-*-*-*-*-*-*-*-*
But since the list in the Data field can contain anything, including dynamic variables that must be deleted later, it is not suitable and we need inheritance.
So, it's either "class" which, because of TClass always draws unbelievable amount of trash into each list item in the form of completely unnecessary inherited table of huge number of virtual methods. Or the old "object" type as I understand, deprived of all this and even Lazarus gives me in the hint only those fields and methods, which I defined myself....
" I posted on this forum about how to do that some years ago." - Can you give me a link to read...