New Feature: "Management Operators"

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

New Feature: "Management Operators"

African Wild Dog
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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Feature: "Management Operators"

Maciej Izak

2016-11-07 22:24 GMT+01:00 African Wild Dog <[hidden email]>:

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?

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:


anyway probably I have no motivation anymore to continuing my work.

--
Best regards,
Maciej Izak

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Feature: "Management Operators"

denisgolovan
 
 
08.11.2016, 11:48, "Maciej Izak" <[hidden email]>:
 
anyway probably I have no motivation anymore to continuing my work.
 
That's unfortunate for the community, IMHO.
Personally, I appreciate your idea of management operators.
 
-- 
Regards,
Denis Golovan
 

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Feature: 'Management Operators'

noreply
In reply to this post by Maciej Izak
On Tue, November 8, 2016 1:47 am, Maciej Izak wrote:

> 2016-11-07 22:24 GMT+01:00 African Wild Dog <[hidden email]>:
>
>
>>
>> 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?
>>
>>
>
> Yes. We have a working ARC objects

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...
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Feature: 'Management Operators'

denisgolovan
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" <[hidden email]>:

> On Tue, November 8, 2016 1:47 am, Maciej Izak wrote:
>>  2016-11-07 22:24 GMT+01:00 African Wild Dog <[hidden email]>:
>>
>>>  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?
>>
>>  Yes. We have a working ARC objects
>
> 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...
> _______________________________________________
> fpc-pascal maillist - [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

--
Regards,
Denis Golovan
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Feature: "Management Operators"

leledumbo
Administrator
In reply to this post by Maciej Izak
> 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.
Reply | Threaded
Open this post in threaded view
|

Re: New Feature: 'Management Operators'

noreply
In reply to this post by denisgolovan
On Wed, November 9, 2016 2:40 am, denisgolovan wrote:

> 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
>
>
>

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).


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Feature: 'Management Operators'

noreply
In reply to this post by leledumbo
On Wed, November 9, 2016 7:11 am, leledumbo wrote:
>> 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.
>
>

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-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Feature: 'Management Operators'

leledumbo
Administrator
> 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.