5 ms·
> hidden control flow (function calls should look like function calls, an operation should never mask a function call) An operator is either a function call or
by avgcorrection 3y ago
> hidden control flow (function calls should look like function calls, an operation should never mask a function call)
An operator is either a function call or some simple built-in operation.
Thus not hidden.
That syntactic elements that consist of symbols rather than alnum and that are used as prefix or infix operators are necessarily “not a function call” is just a rule that can be changed.
- Mawr 3y ago> An operator is either a function call or some simple built-in operation. In theory, yes. In practice, an operator is a simple built-in operation 99.999% of the time, which lures programmers into thinking that's how it always is. It's like a self-driving car that's safe 99.999% of the time but still requires you to continuously pay attention to take over at a second's notice. Humans just don't work like that.
- avgcorrection 3y ago> In theory, yes. In practice, an operator is a simple built-in operation 99.999% of the time, which lures programmers into thinking that's how it always is. Noo it isn’t. Many languages use something like `+` for string concatenation. Maybe list concatenation.