Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: > >> [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: >> >> | that is of course also my goal. and a lot of intent is hidden in >> | bad nameing. (match() anyone..., ok we are matching... but _what_. >> | Just naming the functor EqualBranchNames() would make things a lot >> | nicer.) >> >> Did you see there there were two functors I removed in the patch for >> this specific thing? >> >> SameName >> match > | No. > | Look, I understand why you want to introduce this patch and I agree | fully with your reasons.
As it is now: now I don't. (parts of it: yes, but not all of it.) | However, I disagree with you when you say | that the resulting code is easy to read. Christian's arguments ring | true to me too --- code should not rely on formatting to be | understandable. OTOH formatting has always been paramount to understanding/readability: if (complex stuff) complexline; else complexline; will also require indending and formatting to be readable. | return bind(logical_and<bool>(), | bind(equal_to<string>(), | bind(&Converter::from, _1), | from), | bind(equal_to<string>(), | bind(&Converter::to, _1), | to)); | is well chosen. Certainly. > | My question is whether we can avoid these arbitrarily-named functors | and have code which is understandable at-a-glance. If the code above | could be replaced with | return (from == lambda::_1.from() && to == lambda::_2.to()); | then I'd be very happy indeed. Are you really ready for lambda? (and labmda has harsher compiler requirements than function/bind) -- Lgb