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

Michael Van Canneyt michael at freepascal.org
Wed Apr 25 15:42:45 CEST 2018



On Wed, 25 Apr 2018, Ryan Joseph wrote:

>
>
>> On Apr 25, 2018, at 8:06 PM, Marco van de Voort <marcov at stack.nl> wrote:
>> 
>> Fundamental changes in the object model are never minor. Delphi/Object
>> Pascal does not allow static objects, so that is a big thing.
>
> I guess I’m not seeing this same way as others are. It seems like if we have a stack of static memory we should we able to use that instead of GetMem if we want to (like is possible for all other types). GetMem just find a memory address from RAM so why can’t there be a function that finds a memory address from the stack? In my mind I’m seeing this as a transparent implementation detail that the class handles for you inside the class method which allocates the classes internal pointer. Something in me says that we have this memory mapped at compile time so we should be able to access it. 
>
> well having said all that I understand why it’s easy to dismiss because it’s frankly one of dozens of new features you could add to FPC.
>> 
>>> All the talking about manually memory management is a thing of the past
>>> for most programmers out there today.  Pascal will get left behind but it
>>> can still survive as a low-level performant language like C++ so that?s
>>> where my motivations are for Pascal.
>> 
>> Maybe, but then I think creating a new dialect that takes these features to
>> the core is preferable, rather than some crutches to a dialect/compiler with
>> a different bent. Because you risk having the worst of both worlds
>> otherwise.
>
> Certainly this is a crutch because there isn’t a full ARC system.  I see
> it as an easy solution and a quick fix to get a little more utility out of
> the language without overhauling everything.  Are there actual plans to
> make a new dialect of FPC?  At this point I don’t know what the language
> would need to do to make it competitive with new entries into the market.

'make it competitive with new entries in the market' is not a goal of the
free pascal team.

This is a hobby project for most devs. Monetary gain is not a goal.

Probably sounds like an anachronism in this day and age, but there you are...

Michael.


More information about the fpc-pascal mailing list