Content deleted Content added
added Rust as it's a well known language with UFCS Tags: Reverted Visual edit |
Removed Rust from the list of languages supporting UFCS, as detailed by the "Rust usage of the term" Tags: Manual revert references removed |
||
Line 1:
'''Uniform Function Call Syntax''' ('''UFCS''') or '''Uniform Call Syntax''' ('''UCS''') or sometimes '''Universal Function Call Syntax''' is a [[programming language]] feature in [[D (programming language)|D]],<ref name=":0" /> [[Nim (programming language)|Nim]],<ref>{{Cite web |title=Nim by Example - Procs |url=https://nim-by-example.github.io/procs/ |access-date=2024-05-19 |website=nim-by-example.github.io
UFCS is particularly useful when function calls are chained<ref name=":0">{{cite web|url=http://ddili.org/ders/d.en/ufcs.html|title=Programming in D - Universal Function Call Syntax (UFCS)|website=Ddili.org|accessdate=1 October 2017}}</ref> (behaving similar to [[Pipe (computer science)|pipe]]s, or the various dedicated [[Operator (computer programming)|operator]]s available in [[functional language]]s for passing values through a series of [[Expression (computer science)|expression]]s). It allows free-functions to fill a role similar to [[extension method]]s in some other languages. Another benefit of the syntax is related to completion systems in [[Integrated development environment|IDEs]], which use type information to show a list of available functions, dependent on the context. When the programmer starts with an argument, the set of potentially applicable functions is greatly narrowed down,<ref name="auto">{{cite web|title="Unified Call Syntax"|url=https://isocpp.org/files/papers/N4165.pdf|website=Isocpp.org|accessdate=1 October 2017}}</ref> aiding [[discoverability]].
|