Monday, April 27, 2015

[imxscmnf] Function call syntax

A brief survey of syntax used by different programming languages to express calling a function:

Calling a one-argument function:
f x
(f x)
f(x)

Calling a two-argument uncurried function:
f x,y
f(x,y)
(f x y)

Calling a two-argument curried function:
f x y
((f x) y)
f(x)(y)

Calling a zero-argument function:
f
(f)
f()

Intriguing but not implemented as far as I know is a Lisp-like language that prefers currying and partial application like Haskell.

No comments :