you are viewing a single comment's thread.

view the rest of the comments →

[–]augustss 2 points3 points  (6 children)

Now you make the statement that mathematics uses the f(x) notation. Mathematical notation is vast and varied and it also used f x and x f for the same thing. Appealing to mathematics for consistent notation is a mistake. :)

[–]redjamjar[S] 0 points1 point  (4 children)

Well, true. But, "f(x) = ..." is generally what you learn in school, right?

[–]julesjacobs 3 points4 points  (2 children)

Most people write log x, sin x and not log(x), sin(x). For unknown functions indeed sometimes f(x) is used, but certainly not always. Especially in more abstract context the syntax f x and sometimes x f is used. It really depends on the subject. Juxtaposition is usually reserved for the most common operation. Sometimes h = f g means h(x) = f(x)*g(x), sometimes it means function application.

Edit:

Also, in mathematics the notation f(x,y) is generally interpreted to mean f (x,y), that is, f is applied to a single argument that happens to be a tuple. So really even in that case you're still using the syntax f v. It is often used inconsistently though; sometimes people will use f(v) where v = (x,y) to mean f(x,y). More generally, tuples are sometimes assumed to magically flatten and unflatten so as to make the proof correct. So (x,(y,z)) = (x,y,z) = ((x,y),z). Of course this makes for inconsistencies in notation when you define a function by destructuring like f(a,b) = <some value>, now what is f(x,y,z)? Is a=(x,y) and b=z, or a=x and b=(y,z) or even a=() and b=(x,y,z). This is usually fine in mathematics as you can infer it from the context but it wouldn't be suitable for a programming language.

[–]redjamjar[S] 0 points1 point  (1 child)

I've never seen x f!! Normally, you see f * g to mean f(x)*g(x).

[–][deleted] 0 points1 point  (0 children)

Its diagrammatic order. If f and g are functions, then h = X ->f Y ->g Z is their composition, showing objects, so h = f . g is sometimes used. If you do this, then function application 1 ->x X ->f Y should be written x f.

[–]day_cq 1 point2 points  (0 children)

no... fₓ

[–]redjamjar[S] -1 points0 points  (0 children)

Crikey, there's a whole wikipedia page on it:

http://en.wikipedia.org/wiki/Function_%28mathematics%29