[fpc-pascal] Stack alias for ARC like memory management?

Marco van de Voort marcov at stack.nl
Wed Apr 25 10:22:50 CEST 2018


In our previous episode, Ryan Joseph said:
> 
> But putting classes on the stack is a core feature which is very well used
> and great for performance (why people still use c++ for games).  Why isn?t
> that useful?

Most seem to be covered already by having records-with-methods. The only
issue is that it is a different kind of  "object".

>  So many of the stupid memory management patterns we use in Pascal could
> be replaced if the language had some good support for it.  C++ does it and
> on the other end ARC languages do it for you, albeit at a performance
> loss.

I think if you want to pursue this, you must be much more concrete. Both the
benefits and the potential pitfalls.
 
> Maybe I don?t know who the market for Pascal is anymore because to me it
> seems like a legacy language which is being kept alive by a small group of
> hobbyist but never actually used for any real world application

This is patently false. Both Delphi and FPC are used professionally.

>   I?ve already pretty much given up writing Mac apps with Pascal because
> it?s so hard to keep up to date and Swift is better than Objective-C but
> I?d like to keep using it for games if I can.  At the end of the day I
> really want to be able to say at least Pascal is a good low-level language
> for writing fast code but in the face of C++ that?s kind of dubious claim.

The dubious claim is the suggestion that detail language features are the
main cause for language uptake. It isn't.



More information about the fpc-pascal mailing list