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.
-
-
It stems from the misunderstanding that programming is telling a computer _what_ to do. But telling a computer _how_ to do it is actually what programming is, and in order to be truly "zero cost", an abstraction must retain the ability for the programmer to specify "how".
-
"Zero cost" does not mean that there is no downside or drawback; it means that it is implemented in such a way that you do not lose performance compared to writing the same behavior without the abstraction. I agree that programming is often the art of telling a computer _how_...
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.