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

2018-04-24 Thread Ryan Joseph
> On Apr 25, 2018, at 12:59 PM, Sven Barth via fpc-pascal > wrote: > > No. This would more often than not lead to accidents were users pass such an > instance to some outer code (it doesn't even need to the routine with the > stack object, but some third party routine that for some reason st

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

2018-04-24 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 25. Apr. 2018, 03:46: > What do you think? Is there any merit to this idea? It’s not real > reference counting but it’s a simple solution to improve performance and > clean up code in many common scenarios. > No. This would more often than not lead to accidents were u

[fpc-pascal] Blowfish encryption: What I´m doing wrong?

2018-04-24 Thread Guionardo Furlan
Hello guys I´ve a single code to encrypt/decrypt strings using Blowfish. function TBlowFishCripto.Encrypt(const Value: string): string; var en: TBlowFishEncryptStream; stream: TStringStream; begin if length(Value) = 0 then begin Result := ''; Exit; end; try stream := TStri

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

2018-04-24 Thread Ryan Joseph
I had another idea and I was just curious what anyone thought about it. Between C++ where classes can either be on the stack or heap and full ARC like in Swift/Java FPC is kind of in the middle with a unified heap-only class system which is easier to use than C++ (classes are always pointers so

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-24 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 24. Apr. 2018, 10:44: > > > > On Apr 24, 2018, at 12:48 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Because that is how helper currently work. Extending it with a new > feature will not change that. > > > > I made an example to see

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-24 Thread Ryan Joseph
> On Apr 24, 2018, at 12:48 PM, Sven Barth via fpc-pascal > wrote: > > Because that is how helper currently work. Extending it with a new feature > will not change that. > I made an example to see how this would look. What’s the problem with “last in wins” like seen below? Seems pretty st