Hacker News new | past | comments | ask | show | jobs | submit login

There's nothing half-assed about gcc nested functions - they work exactly as they should. The problem is that the feature was implemented back when runtime constraints were very different - in particular, there were no limits on dynamic codegen, not even on the stack. Using thunks for callbacks was a common technique back then - and why not, given the perf benefits? On top of that, ironically, it was also the only way pointers to nested functions could be transparently compatible with the C ABI.

So I don't think your criticism is valid in this case. It's more a general problem with all language extensions, and how they interplay with language evolution.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: