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.
-
-
"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_...
-
to do something, but that is not always the case. As an obvious example, optimizing compilers can generally do register allocation as well as humans could.
- Show replies
New conversation -
-
-
Perhaps there is a correlation between thinking you can skip the "how" and desperately wanting to identify as something other than programmer. We are in a mess. The majority are looking for pipe dream shortcuts to achieve "more" while understanding less.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.