The Scala language implements a programming concept known as the Uniform Access Principle, which was first put forth by Bertrand Meyer, the inventor of the Eiffel programming language.
The Scala language implements a programming concept known as the Uniform Access Principle, which was first put forth by Bertrand Meyer, the inventor of the Eiffel programming language.
This principle states that variables and parameterless functions should be accessed using the same syntax. Scala supports this principle by allowing parentheses to not be placed at call sites of parameterless functions. As a result, a parameterless function definition can be changed to a val
, or vice versa, without affecting client code:
The parameterless execute method has been deprecated and will be removed in a future version of ScalaTest. Please invoke execute with empty parens instead: execute().
The trap method is no longer needed for demos in the REPL, which now abreviates stack traces, and will be removed in a future version of ScalaTest