Hacker News new | ask | show | jobs
by int_19h 1254 days ago
The problem isn't doing it as such; ALGOL 60 could do nested functions just fine.

The problem is doing it in an ABI-compatible way when you already have an ABI. The gcc implementation of nested functions does that - they are compatible with regular function pointers - but at the cost of requiring executable stack on at least some platforms.

And for C compilers that aren't gcc, the question becomes: why partially implement a non-standard gcc feature?