3 ms·
You can do this without an explicit statement terminator. In Scala, you can write something like this and just have it work. foo.bar(arg, objectToComputeArg
by anonymoushn 14y ago
You can do this without an explicit statement terminator. In Scala, you can write something like this and just have it work.
foo.bar(arg, objectToComputeArg2.computeArg(innerArg1, innerArg2,
innerArg3), arg3)
You can do the same in Python or in Lua. Lua will yell at you when it's actually ambiguous, as in
function_returning_a_function(arg)(arg_to_returned_function)
(it_is_not_clear_whether_this_is_a_call_to_the_value_returned_by_the_previous_line())
You can disambiguate this with parentheses or using a semicolon, though. There's never actually a need to use a semicolon.