lunduniversity / introprog

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

4.3 Task 6 - for-loop is written with Scala 2 syntax #671

Closed valterbergstrand closed 1 year ago

valterbergstrand commented 2 years ago

in 4.3, Task 6a is written with Scala 2 syntax, maybe change to Scala 3 syntax for consistency?

bjornregnell commented 2 years ago

Yes the for should have a do. Do you want to contribute with a PR yourself or do you want me to fix it?

bjornregnell commented 2 years ago

I guess the whole lab should be washed out of curly braces and primitive mains as well (even if curly braces never will be deprecated and is perfectly valid Scala 3 syntax...). What do you think?

(But old-style for, while, if without do or then will be deprecated at some point if I have understood it correctly)

bjornregnell commented 2 years ago

There is also a while missing a do in task 7 and an if missing a then in task 11, etc.