[Development] RFC: Containers member functions for algorithm
viktor.engelmann at qt.io
Thu Mar 23 12:04:08 CET 2017
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:
>> proposals floating around for years to make o.f() fall back to f(o) for std
> 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.
> Development mailing list
> Development at qt-project.org
The Qt Company GmbH
Rudower Chaussee 13
Viktor.Engelmann at qt.io
+49 151 26784521
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development