Conversation

This Tweet was deleted by the Tweet author. Learn more
Several PLs having "inline lambdas" which do what you want here. Macros are great when they work, but wow when things go wrong, the error reporting can be complicated or unhelpful. I've been using Rust lately, and macros are used everywhere -- often awesome. Sometimes awful.
2
10
What languages have "inline lambdas" that give you the same kinds of benefits you can get from macros? I've been looking for a feature like that but haven't really found anything.
2
1
Rust's stack-allocated lambdas also inline pretty aggressively via monomophisation, so you usually use them as if they behave like 'inline functions'. But I think it's fair to say that it would be nice to be explicit about the staging, and do it earlier (ie. before hitting LLVM).
1