News for hackers. Stuff that matters.
Re:Self-inlining anonymous closures in C++ by shin_lao on Friday September 24, 2010 @05:27AM (#1723164)
A lot of people will read this and think "damn C++ is such an ugly language, it should never allow the programmer to do this!".

The reality is that that kind of technique allows to produce extremely fast code because the compiler has got so much "certain" information at compile time that it can optimize very aggressively.

It's more powerful than vanilla C macros because it works with the compiler, not the pre-processor.

Re:Self-inlining anonymous closures in C++ by andymorris on Friday September 24, 2010 @05:50AM (#1723199)
C++ is the highest-level language that I can accurately guess the assembly that will be actually run by the processor.

YMMV whether that's a blessing or a curse, though!