One might be confused or even angered when they learn about Scala’s convention regarding parenthesis usage for no-arg functions. The convention is this: given a no-arg function, you use put parentheses next to the function call only if the function has side effects. So, you would invoke a function named printCurrentState by writing printCurrentState(), since printCurrentState […]
Posts Tagged ‘Scala’