I agree, but Marc actually just said that creator could suggest functions with signature f(T) when one presses . after an object o of type T. That's not the same as allowing the syntax o.f() to call f(o).
On 23.03.2017 11:51, Konrad Rosenbaum wrote: > On Thursday, March 23, 2017 10:36:06 Marc Mutz wrote: >> There're >> proposals floating around for years to make o.f() fall back to f(o) for std >> C++. > Those are a lot more pain than you'd think! This construct already exists in > C# (static extension classes/methods) and it is causing major headaches there > - depending on your using statements (equiv. of #include) what looks like a > simple method call can mean totally different things or not work at all! A > change in a different section of the class that necessitates an additional > using directive may cause all kinds of mayhem. It is a nightmare if you have > to diagnose problems. > > In short: the recommendation in the C# world is: "do not use them unless you > absolutely positively have no other choice." We should take that as a warning. > > > Konrad > > > _______________________________________________ > Development mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/development -- Viktor Engelmann Software Engineer The Qt Company GmbH Rudower Chaussee 13 D-12489 Berlin [email protected] +49 151 26784521 http://qt.io Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho Sitz der Gesellschaft: Berlin Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
