Ryan Joseph <r...@thealchemistguild.com> schrieb am Mi., 18. Juli 2018, 19:00:
> > > > On Jul 18, 2018, at 7:14 AM, Ben Grasset <operato...@gmail.com> wrote: > > > > Classes are unsuitable performance-wise for many use cases, and TP > objects lack important features such as variant parts. Advanced records are > a great lightweight in-between point. > > Yes indeed. Not being able to allocate classes on the stack is a scandal > for Pascal. I don’t know why the devs decided classes must be on the heap > and anything other than that would violate some supposed design principle > (Delphi??). > A point against stack based classes is that Object Pascal's object model is highly geared towards polymorphism (with things like virtual class methods and constructors that C++ does not support). You can't make use of this however if the class is instantiated on the stack. Regards, Sven >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal