lunduniversity / introprog

Teaching material for "Introduction to Programming using Scala" at Lund University, LTH. http://cs.lth.se/pgk/
141 stars 167 forks source link

check if add should be used instead of mutation with the += method #785

Closed bjornregnell closed 3 weeks ago

bjornregnell commented 6 months ago

It may be confusing at fist to use the += method so better perhaps to start with add and then explain that += is not shorthand for assignment if a += method exists.

bjornregnell commented 6 months ago

image

bjornregnell commented 6 months ago

...but more places in chap5 or chap7 might also be in scope of this...

bjornregnell commented 3 weeks ago

mutable.Map has addOne and addAll ; should be in quickred

bjornregnell commented 3 weeks ago

compenidium fixed here https://github.com/lunduniversity/introprog/commit/0ab66897a7cb23005a0437dcfc090dc1cf163c7a and https://github.com/lunduniversity/introprog/commit/c012fc167362fc2238d364fa92100423c5b250ff

added issue for quickref #793