3 ms·
I think saying that “f x” is in any sense more mathematical than “f(x)” is stupid. Ask a mathematician and you may find they prefer “fx”, “f(x)”, “f[x]”, “xf”,
by dan-robertson 8y ago
I think saying that “f x” is in any sense more mathematical than “f(x)” is stupid. Ask a mathematician and you may find they prefer “fx”, “f(x)”, “f[x]”, “xf”, “f.x”, “x.f” (does this make oop mathematical then?), or something else entirely. Perhaps they just write f and never mention x.
Using lots of operators is certainly something that could be seen as more mathematical but then I guess that makes APL much more mathematical than Haskell and ocaml and c++ and perl combined. I don’t think that counts as mathematical but it is a difference of style.
For specifying signatures this is surely a style thing. In type theory, types are normally put right next to the values and so in this respect Haskell and ocaml are not mathematical. I say this is a style thing as one can write types separately from variables, next to them, or not at all.
For “types not being a namespace” I’ll give you that criticism for Haskell (but also for C) and maybe for ocaml but recall the common idiom of calling all types “t” and putting them in their own modules with relevant functions. I don’t see how this is more mathematical.
My general complaint is that these aren’t differences on a more/less “mathematical” spectrum. The only mathematical things are that ocaml/Haskell are closer to lots of the fashionable PLT research than C and that research is certainly mathematical. Also Haskell people tend to fetishise category theory and abstract algebra so lots of the code that’s written is sort-of mathematical. Haskell also suffers from readability problems mainly due to the people who write Haskell and what they like rather than the language itself.