#odersky-programming-in-scala-1ed #scala
You cannot write " println 10 ", but you can write " Console println 10 ".
If you want to change selection, open document below and click on "Move attachment"
Next Steps in Scalarentheses. The to in this example is actually a method that takes one Int argument.
The code 0 to 2 is transformed into the method call (0).to(2).[1]
Note that this syntax only works if you explicitly specify the
receiver of the method call. <span>You cannot write "println 10", but you
can write "Console println 10".
Scala doesn't technically have operator overloading, because it doesn't actually have operators
in the traditional sense. Instead, characters such as +, -, *, and / can
be used in method Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details