[fpc-pascal] Feature announcement: Management Operators

noreply at z505.com noreply at z505.com
Sat Mar 4 17:55:57 CET 2017


On 2017-02-28 14:50, Graeme Geldenhuys wrote:
> On 2017-02-28 20:40, noreply at z505.com wrote:
>> Sorry, I've been out of touch with what's happening with Records 
>> lately
>> in modern pascal/delphi/etc.
> 
> Don't worry, I'm with you on that one. All I know is that
> Borland/CodeGear/EMBT broken TP Objects somewhere in Delphi. Then they
> decided they want that functionality back, so instead of fixing TP
> Objects, the decided to butcher Records to act just like TP Objects
> (well, pretty much)! Go figure.
> 
> I mostly code with classes, but do still us TP Objects mixed in with my
> code for simpler data structures where I don't really want to
> instantiate objects. Records - well, I use them like they were defined
> in Delphi 7 and earlier. I really don't see the need for Records with
> Methods (ie: TP Objects) and such.
> 
> Regards,
>   Graeme
> 

There are many cases where I do not want to free and create an object 
and just use something on the stack instead. TP objects kind of offered 
a solution to this, but not really, since if you used an old TP object 
which was designed to be on the heap, but you used in on the stack 
instead - problems would occur...

I'm fond of what Oberon and Golang are doing to try and solve the issue, 
but, that's garbage collected rather than stack.  And in those languages 
you have to send the self parameter in as your own (there is no hidden 
self, you create your own self shortform)



More information about the fpc-pascal mailing list