News for hackers. Stuff that matters.
Re:Why std::bind can’t be formally deprecated by makecheck on Sunday July 02, 2017 @06:49PM (#14684730)
And cleaner still is to not obfuscate things to this degree, no matter what syntax is involved.

It certainly violates the “write once, read many times” principle: no matter how many times I look at something like this, I have to study the whole thing just to figure out what is even happening! Whereas, seeing "void g(x) { f(2, 5, x); }" is perfectly clear.

It certainly violates the “premature optimization” principle: in exchange for some unproven benefit, the compiler does gymnastics to bind arguments and adds compile time instead of just paying a little more in space and runtime to define a 2nd function that calls a 1st function in a completely obvious way.

It also qualifies as over-design. Even if a single binding is considered OK (and that’s a big “if”), there is every reason to expect that during normal maintenance someone will need to keep adding more. Then you have several lines of template-ese. A simple function is something that anyone can extend, whereas it’s not clear most engineers will even know how to maintain the binding version.

Re:Why std::bind can’t be formally deprecated by solidsnack9000 on Sunday July 02, 2017 @09:30PM (#14685323)
I'm not sure how to read your comment. Are you saying not to use lambdas or closures, and just to define new functions?