On Mar 24, 2022, at 8:16 PM, Mouse wrote:
> Nested functions are not closures, or at least not what I know as
> closures. A nested function pointer (conceptually) goes invalid as
> soon as anything it refers to goes out of scope, or at the latest as
> soon as its smallest enclosing block exits (
On Thu, Mar 24, 2022 at 11:16:58PM -0400, Mouse wrote:
> > The conclusion over the past ~25 years has been that there isn't;
> > qsort and things like it work "well enough" and real uses for
> > closures that really motivate the feature come up rarely enough that
> > it doesn't happen.
>
> N
> [...] said, moving to fat function pointers on machines that don't
> already use them is a real ABI change and therefore a big deal; but
> it could be done if there were a compelling argument to justify going
> through all the associated dark rituals.
Or as a private experiment, in which compati
On Tue, Mar 22, 2022 at 09:16:36PM -0400, Mouse wrote:
> Indeed, you can have different sizes for pointers to different object
> types, too. I _think_ pointers to different function types can have
> different sizes, but I'm less certain of that. (There would be little
> point, since all funct
>> Can't you? Does C require function pointers to have the same type,
>> or compatible structure, as data pointers?
> No, I don't think that it does.
Correct.
> You could have different sizes for those.
Indeed, you can have different sizes for pointers to different object
types, too. I _think_
> On Mar 22, 2022, at 2:23 PM, Mouse wrote:
>
>
> [EXTERNAL EMAIL]
>
>>> I found an interesting article about why they're bad...
>>> https://urldefense.com/v3/__https://thephd.dev/lambdas-nested-functions-block-expressions-oh-my__;!!LpKI!1zB1gatUTEiM-j9CQ_6N-NWd4jS8UvW5iTSMRgW1tEyW_mK0mG2pU
>> I found an interesting article about why they're bad...
>> https://thephd.dev/lambdas-nested-functions-block-expressions-oh-my
> That's a good argument for why GCC's implementation of nested functions is b$
What security blunder is that? Based on your next line, I'm going to
assume it's "imple