Share with your friends
hdshahin01

Call

Uniform Function Call Syntax or Uniform Calling Syntax 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 , by using the receiver as the first parameter, and the given arguments as the remaining parameters. UFCS is particularly useful when function calls are chained. 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 "dot-autocomplete" 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.

Talk Doctor Online in Bissoy App