3 ms·
I loathe function calls without parentheses; it always looks vaguely ambiguous to me.
by pavel_lishin 6y ago
I loathe function calls without parentheses; it always looks vaguely ambiguous to me.
- enriquto 6y ago> I loathe function calls without parentheses; it always looks vaguely ambiguous to me. But then again, throwing and catching exceptions through arbitrary depths along the call stack is perfectly clear and neat.
- SAI_Peregrinus 6y agoParentheses are only needed with infix notation. Pure prefix (like Unlambda) or pure postfix notation (like Forth) are unambiguous without them. Whether the resulting language is easy to understand is a far more complicated question.
- pavel_lishin 6y ago> Whether the resulting language is easy to understand is a far more complicated question. That's why I hate them. A programming language is primarily meant to be read by people. If I see something like thing noun object What's going on there? Is thing a function? Is noun? Am I passing two arguments to thing, or am I passing the result of invoking the function noun with the argument object? Hell, if I have something like verb action it certainly looks like I'm calling a function called verb with the argument action, but is the argument I'm giving to verb the actual function action, or the result of evaluating action? Yes, in any given language there's probably a single answer to all of these, but I bet it varies from language to language, and I'd really, really, really rather not waste calories by having my brain try to figure it out.
- fernandotakai 6y agoi took me a while to get used to `print()` but now that i'm used to it, when i see py2 code i get... confused? it doesn't look right. same with `class Foo(object):`
- pdonis 6y ago> same with `class Foo(object):` That's still legal, and actually I prefer it even though it's not required in Python 3, because explicit is better than implicit.