18:4118:41, 3 November 2023diffhist+268
Scala (programming language)
First, I changed the method addToGrid in the Java example to addPoint, since it really just adds one point to another (it only "adds to grid" in the special case when it is called on the static Point.grid instance. Second, I added the method += to the Scala version of Point to (a) provide a missing method that was originally invoked as addToGrid and (b) illustrate that Scala is capable of defining operators. Third, I added a bullet highlighting theTag: Visual edit
18:4118:41, 3 November 2023diffhist+268
Scala (programming language)
First, I changed the method addToGrid in the Java example to addPoint, since it really just adds one point to another (it only "adds to grid" in the special case when it is called on the static Point.grid instance. Second, I added the method += to the Scala version of Point to (a) provide a missing method that was originally invoked as addToGrid and (b) illustrate that Scala is capable of defining operators. Third, I added a bullet highlighting theTag: Visual edit