Proposals for a unification of member function and free function calling syntax have been discussed from the early years of C++ standardization. Glassborow (2004) proposed a Uniform Calling Syntax (UCS), allowing specially annotated free functions to be called with member function notation.9 In 2016 it has been proposed a second time for addition to C++ by Bjarne Stroustrup10 and Herb Sutter,11 to reduce the ambiguous decision between writing free functions and member functions, to simplify the writing of templated code. Many programmers are tempted to write member functions to get the benefits of the member function syntax (e.g. "dot-autocomplete" to list member functions);12 however, this leads to excessive coupling between classes.13 This has again, in 2023, been proposed by Herb Sutter14 claiming new information and insights as well as an experimental implementation in the cppfront compiler.
Until 2018, it was common15 to use this term when actually referring to qualified/explicit path syntax and most commonly the Fully Qualified Path syntax: because it is possible to have several traits defining the same method implemented on the same struct, a mechanism is needed to disambiguate which trait should be used. Member functions can also be used as free functions through a qualified (namespaced) path. The term UFCS is incorrect for these uses, as it allows using methods as (namespaced) free functions, but not using free functions as methods.
"Programming in D - Universal Function Call Syntax (UFCS)". Ddili.org. Retrieved 1 October 2017. http://ddili.org/ders/d.en/ufcs.html ↩
"Nim by Example - Procs". nim-by-example.github.io. Retrieved 2024-05-19. https://nim-by-example.github.io/procs/ ↩
"The Koka Programming Language". koka-lang.github.io. Retrieved 2024-05-19. https://koka-lang.github.io/koka/doc/book.html ↩
"Effekt Language: Introduction to Effekt". Effekt Language. Retrieved 2024-05-19. https://effekt-lang.org/docs/#function-application ↩
"Functions - D Programming Language". Dlang.org. Retrieved 1 October 2017. http://dlang.org/function.html#pseudo-member ↩
"Operators - Avisynth wiki". a.function(b) is equivalent to function(a, b) http://avisynth.nl/index.php/Operators#Operator_Precedence ↩
""Unified Call Syntax"" (PDF). Isocpp.org. Retrieved 1 October 2017. https://isocpp.org/files/papers/N4165.pdf ↩
Francis Glassborow (2 May 2004). "N1585: Uniform Calling Syntax (Re-opening public interfaces)" (PDF). Retrieved 17 December 2018. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1585.pdf ↩
""UFCS proposal"" (PDF). Open-std.org. Retrieved 1 October 2017. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf ↩
"using intellisense". Msdn.microsoft.com. Retrieved 1 October 2017. https://msdn.microsoft.com/en-us/library/hcw1s69b.aspx ↩
"How Non-Member Functions improve encapsulation". Drdobbs.com. Retrieved 1 October 2017. https://www.drdobbs.com/cpp/how-non-member-functions-improve-encapsu/184401197 ↩
Sutter, Herb (13 October 2023). "Unified function call syntax (UFCS)" (PDF). https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p3021r0.pdf ↩
"Rename UFCS to accurately reflect its functionality. · Issue #1140 · rust-lang/rfcs". GitHub. Retrieved 2024-05-19. https://github.com/rust-lang/rfcs/issues/1140 ↩