Skip to content

Comment on Implementation of GCC's Nested Functions (vs. C++ Lambdas)parent

Comments

C++, C#, Java, JavaScript, Rust, Go, Julia, Nim, Zig.

I'm shocked that you didn't even pick up Rust, given how frequently I mention it on the WG14 reflector.

I am confused why you cite these languages as an example to your claim that closures are preferred over nested functions in language design (which is already a confusing statement), as many of them do have nested functions, e.g. Go, Julia, C#, Javascript, Nim. Rust has at least limited "non-capturing" nested functions as far as I know.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.