Content deleted Content added
note several other languages (koka, effekt) implementing UFCS; add secondary citations Tags: Visual edit Disambiguation links added |
m remove primary sources template |
||
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}}</ref> Koka,<ref>{{Cite web |title=The Koka Programming Language |url=https://koka-lang.github.io/koka/doc/book.html |access-date=2024-05-19 |website=koka-lang.github.io}}</ref> and Effekt<ref>{{Cite web |last= |first= |title=Effekt Language: Introduction to Effekt |url=https://effekt-lang.org/docs/#function-application |access-date=2024-05-19 |website=Effekt Language}}</ref> that allows any [[function (computer programming)|function]] to be called using the syntax for method calls (as in [[object-oriented programming]]), by using the receiver as the first parameter and the given arguments as the remaining parameters.<ref>{{cite web|url=http://dlang.org/function.html#pseudo-member|title=Functions - D Programming Language|website=Dlang.org|accessdate=1 October 2017}}</ref> The same technique is used in the [[AviSynth]] scripting language under the name "OOP notation".<ref>{{cite web|title=Operators - Avisynth wiki|url=http://avisynth.nl/index.php/Operators#Operator_Precedence|quote=<code>a.function(b)</code> is equivalent to <code>function(a, b)</code>}}</ref>
|