Uniform function call syntax: Difference between revisions

Content deleted Content added
Moved "rust usage of the term" to the end of the article, as an incorrect use does not deserve being above the fold.
Line 55:
 
== Rust usage of the term ==
Until 2018 it was common to use this term when actually referring to ''[https://github.com/rust-lang/rfcs/issues/1140#issuecomment-108644620 qualified/explicit path syntax]]'' and most commonly the ''[https://doc.rust-lang.org/book/2018-edition/ch19-03-advanced-traits.html?highlight=trait,function,call#fully-qualified-syntax-for-disambiguation-calling-methods-with-the-same-name Fully Qualified SyntaxPath for Disambiguationsyntax].'': Inbecause Rustit's manypossible traitsto canhave implementseveral functionstraits withdefining the same namemethod forimplemented aon giventhe typesame struct, so a mechanism is requiredneeded to tell the compilerdisambiguate which onetrait itshould shouldbe useused.
 
Member functions can also be used as free functions bythrough accessinga them throughqualified the(namespaced) typepath.
 
The term UFCS is incorrect for these uses, as it allows using methods as (namespaced) free functions, but not using free functions as methods.