Uniform Function Call Syntax (UFCS) or Uniform Calling Syntax (UCS) or sometimes Universal Function Call Syntax is a programming language feature in D and Nim that allows any function to be called using the syntax for method calls (as in object-oriented programming), by using the as the first parameter, and the given arguments as the remaining parameters. UFCS is particularly useful when function calls are chained (behaving similar to pipes, or the various dedicated operators available in functional languages for passing values through a series of expressions). It allows free-functions to fill a role similar to extension methods in some other languages. Another benefit of the method call syntax is use with "" in IDEs, which use type information to show a list of available functions, depen
Attributes | Values |
---|
rdf:type
| |
rdfs:label
| - Uniform Function Call Syntax (en)
|
rdfs:comment
| - Uniform Function Call Syntax (UFCS) or Uniform Calling Syntax (UCS) or sometimes Universal Function Call Syntax is a programming language feature in D and Nim that allows any function to be called using the syntax for method calls (as in object-oriented programming), by using the as the first parameter, and the given arguments as the remaining parameters. UFCS is particularly useful when function calls are chained (behaving similar to pipes, or the various dedicated operators available in functional languages for passing values through a series of expressions). It allows free-functions to fill a role similar to extension methods in some other languages. Another benefit of the method call syntax is use with "" in IDEs, which use type information to show a list of available functions, depen (en)
|
sameAs
| |
dbp:wikiPageUsesTemplate
| |
Subject
| |
gold:hypernym
| |
prov:wasDerivedFrom
| |
Wikipage page ID
| |
page length (characters) of wiki page
| |
Wikipage revision ID
| |
has abstract
| - Uniform Function Call Syntax (UFCS) or Uniform Calling Syntax (UCS) or sometimes Universal Function Call Syntax is a programming language feature in D and Nim that allows any function to be called using the syntax for method calls (as in object-oriented programming), by using the as the first parameter, and the given arguments as the remaining parameters. UFCS is particularly useful when function calls are chained (behaving similar to pipes, or the various dedicated operators available in functional languages for passing values through a series of expressions). It allows free-functions to fill a role similar to extension methods in some other languages. Another benefit of the method call syntax is use with "" in 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, aiding discoverability. (en)
|
foaf:isPrimaryTopicOf
| |
is Wikipage redirect
of | |
is Link from a Wikipage to another Wikipage
of | |