[fpc-pascal] Are there any drawbacks to "reference to"?

2022-06-05 Thread Anthony Walter via fpc-pascal
As the "reference to" feature was recently added to fpc trunk, I'd like to ask if internally there are any penalties (performance perhaps) or drawbacks to using them in place of the more traditional "procedure" and "procedure of object" types? It's my understanding that for example using this code

Re: [fpc-pascal] Are there any drawbacks to "reference to"?

2022-06-05 Thread Jonas Maebe via fpc-pascal
On 2022-06-05 18:20, Anthony Walter via fpc-pascal wrote: As the "reference to" feature was recently added to fpc trunk, I'd like to ask if internally there are any penalties (performance perhaps) or drawbacks to using them in place of the more traditional "procedure" and "procedure of object"

Re: [fpc-pascal] Are there any drawbacks to "reference to"?

2022-06-05 Thread Anthony Walter via fpc-pascal
Thanks for that, but is that true for all conditions. I remember reading and tinkering about with Delphi when it first introduced closures. At the time it made sense that the extra cruft and interface were needed to capture local state, but I was under the impression that the interface was only nee

[fpc-pascal] Function References Not Working As Expected

2022-06-05 Thread Anthony Walter via fpc-pascal
Regarding a message with an example project I write earlier, I discovered a bug with function references. See this entry I submitted to the gitlab issue tracker. The summary is that a reference to a method function does not output the c

Re: [fpc-pascal] Are there any drawbacks to "reference to"?

2022-06-05 Thread Hairy Pixels via fpc-pascal
> On Jun 6, 2022, at 2:02 AM, Jonas Maebe via fpc-pascal > wrote: > > On 2022-06-05 18:20, Anthony Walter via fpc-pascal wrote: > >> As the "reference to" feature was recently added to fpc trunk, I'd like to >> ask if internally there are any penalties (performance perhaps) or drawbacks >>