Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

About these problems point by point:

1) Agreed. I'd never want to see this technique in my programs.

2) What stops you from giving it a name?

3) Putting code inline is presumably a conscious decision not to extract it into a wider scope.

4) How's it hard to decorate? For mocking and dynamically replacing, again, that goes for any inline code. Objections 3 and 4 have to argue against functions appearing in non-global scopes in general.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: