Hello,
I saw on the bug tracker a patch submission by Maciej Izak about the feature "Management Operators".
This feature is related to Automatic Reference Counting?
Regards

Mailing lists / fpc-pascal / 2016-11
9 messages · 5 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello,
I saw on the bug tracker a patch submission by Maciej Izak about the feature "Management Operators".
This feature is related to Automatic Reference Counting?
Regards
2016-11-07 22:24 GMT+01:00 African Wild Dog :
Yes. We have a working ARC objects (not official yet, very raw form without "compiler magic", but fully functionally/compilable without any regressions) with http://newpascal.org latest release:
https://github.com/maciej-izak/PascalSmartPointers/blob/ master/examples/SmartObj01.pas
https://github.com/maciej-izak/PascalSmartPointers/blob/ master/sources/SmartObj.pas
anyway probably I have no motivation anymore to continuing my work.
2016-11-07 22:24 GMT+01:00 African Wild Dog : Yes. We have a working ARC objects (not…
Can someone briefly explain what this means for code?
Is this related to garbage collected heap allocated objects and similar, without using a garbage collector but using reference counting?
Sorry if I am way off base, I just have no idea what it is...
Yes. Mostly.
More general advantage is that this feature might finally bring FreePascal back into league of languages having nice support for value types (as opposed to OOP atrocities). To put it in other words, functional style might become both feasible and sufficiently fast in FreePascal.
IMHO, that is one of the most valuable additions to the language in years.
BR,
Denis
09.11.2016, 08:29, "Lars" :
2016-11-07 22:24 GMT+01:00 African Wild Dog : Yes. We have a working ARC objects (not…
anyway probably I have no motivation anymore to continuing my work.
Too bad, if only at least the patch for this feature is integrated, I can start arguing to my employer again that Pascal has simple, user selectable garbage collection mechanism. I really wanna know who's the person that you mention in your g+ post.
Yes. Mostly. More general advantage is that this feature might finally bring FreePascal…
Does this remove the amount of "object.free" code seen all over the place?
I.e. is the intent to have something like an "auto" freed object, discussed long ago on the fpc list, literally many years ago... but I remember Michael V. C. saying something about it having some difficulties and road blocks for being implemented for reasons I cannot remember.
I do find the biggest disadvantage of delphi/fpc code, to be all the "Free" and creates scattered throughout code, which has nothing or little to do with the logic of the application and is just code bloat (takes up editor space, adds not much useful, similar to the allocations required in C programs to work with strings instead of it being automatic).
Too bad, if only at least the patch for this feature is integrated, I can start arguing…
FPC will have the garbage collection, but the question remains what happens in Delphi? Would delphi create a similar feature, but make it incompatible with fpc? Once again we arrive at the issue of standardization not being pascal's main advantage.... This will be an fpc extension only?
Would be interesting to see if Embarcadero has even heard of such an idea or plans to implement it (or already has something like it?). Would be good to bring it up with them if not already, as many fpc users are also delphi users. If a fpc user gets used to writing code a certain way in fpc, it would be hard to port all that code to delphi.
FPC will have the garbage collection, but the question remains what happens
in Delphi?
None of my concern actually. It's a simple unit without compiler magic (but requires compiler support for the operator syntax).
Would delphi create a similar feature, but make it incompatible with fpc?
AFAIK their NextGen compiler already has similar feature, with compiler magic under the hood.
Once again we arrive at the issue of standardization not being pascal's main advantage.... This will be an fpc extension only?
With it being a unit, I think so. Just like a bunch of existing units that Delphi doesn't have.