6 ms·
I'd like to see language designers make function calls happen in the order you read them. For example, in most languages you have a notation like f(g(h(x))) wh
by amelius 1y ago
I'd like to see language designers make function calls happen in the order you read them.
For example, in most languages you have a notation like f(g(h(x))) which calls the functions in the exact opposite order of reading which is unnecessarily confusing.
- cb321 1y agoYou would probably enjoy the UFCS https://en.wikipedia.org/wiki/Uniform_function_call_syntax https://en.wikipedia.org/wiki/Uniform_function_call_syntax of Nim, D, etc. Basically `h.g.f(x)` or in Nim you can drop the parens and say `h.g.f x` { but it may not scale past a single argument }. This tends to be only "an option" - more on the "allow/enable" side than the "force them" to do it side, though.