Is passing nested procs outside of the calling scope relying on undefined
behavior? It doesn’t seem like this should be allowed.
===
{$modeswitch nestedprocvars}
program test;
type
TCallback = procedure (i: integer) is nested;
function DoTest: TCallback;
var
Am Do., 15. Nov. 2018, 08:39 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 15, 2018, at 1:27 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > They are only useful when interacting with the external runtime. On
> other OSes nothing would support them thus there is no
Am Do., 15. Nov. 2018, 10:17 hat Ryan Joseph
geschrieben:
> Is passing nested procs outside of the calling scope relying on undefined
> behavior? It doesn’t seem like this should be allowed.
>
See the notes mentioned here:
http://wiki.freepascal.org/FPC_New_Features_2.6.0#Support_for_nested_proc
On Thu, Nov 15, 2018 at 8:15 AM Sven Barth via fpc-pascal
wrote:
>
> Am Do., 15. Nov. 2018, 10:17 hat Ryan Joseph
> geschrieben:
>>
>> Is passing nested procs outside of the calling scope relying on undefined
>> behavior? It doesn’t seem like this should be allowed.
>
>
> See the notes mentione
> On Nov 15, 2018, at 5:14 PM, Sven Barth via fpc-pascal
> wrote:
>
> See the notes mentioned here:
> http://wiki.freepascal.org/FPC_New_Features_2.6.0#Support_for_nested_procedure_variables
>
> Don't know if it is documented as such, but if not, it should be.
>
Sorry I’m not understandin
Am Do., 15. Nov. 2018, 12:26 hat Marcos Douglas B. Santos
geschrieben:
> On Thu, Nov 15, 2018 at 8:15 AM Sven Barth via fpc-pascal
> wrote:
> >
> > Am Do., 15. Nov. 2018, 10:17 hat Ryan Joseph
> geschrieben:
> >>
> >> Is passing nested procs outside of the calling scope relying on
> undefined b
Am Do., 15. Nov. 2018, 12:40 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 15, 2018, at 5:14 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > See the notes mentioned here:
> http://wiki.freepascal.org/FPC_New_Features_2.6.0#Support_for_nested_procedure_variables
> >
> On Nov 15, 2018, at 5:09 PM, Sven Barth via fpc-pascal
> wrote:
>
> Unlike you I'm in active contact with the developer and the last message was
> only a few months ago.
That’s good news then but I’m not going to hold my breath. Best of luck to the
man.
>
>
> Would it be permitted to
> On Nov 15, 2018, at 8:24 PM, Sven Barth via fpc-pascal
> wrote:
>
> The linked entry answers your question directly:
>
> "if you assign a nested routine to nested procedure variable and then exit
> the nested routine's parent stack frame, calling the nested procedure
> variable will resul
Am Do., 15. Nov. 2018, 15:01 hat Ryan Joseph
geschrieben:
> Given that, having a light-weight “anonymous nested function” (not a
> “reference to” closure) is actually a nice compliment and in fact 2
> different things. As FPC’s current c-blocks support demonstrates, it has
> closure properties bu
> On Nov 15, 2018, at 11:30 PM, Sven Barth via fpc-pascal
> wrote:
>
> No, too many ways to do the same thing don't make things easier, not to
> mention that everything needs to be maintained. So this gets a definite "no"
> from me.
>
> Also the overhead for calling an anonymous function i
11 matches
Mail list logo