lunduniversity / introprog

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

w05: Fix exercise quizzes and improve solutions #566

Closed sadphi closed 3 years ago

sadphi commented 3 years ago

I just discovered that the quizzes in exercise w05 were reset to the version pre-migration, which was due to me incorrectly editing the generated .tex files in compendium/generated instead of quiz/QuizData.scala. This should be fixed in this PR, but I can't build the project as I currently have issues with Scala and sbt, so I haven't been able to check it myself. But according to the Github Actions run it should be fine. I also tried running sbt build on another PC that is running Windows, but the build failed there due to Windows missing the program tail.

bjornregnell commented 3 years ago

Very good that you spotted this! However it seems as if some of the behaviour is not Scala 3 but Scala 2; have you tested this with Scala 3? For example MutablePt() should compile and new is not needed in Scala 3 etc. (For details on universal apply methods see https://docs.scala-lang.org/scala3/reference/other-new-features/creator-applications.html )

bjornregnell commented 3 years ago

Let's discuss this live on Discord before further actions.

bjornregnell commented 3 years ago

Let's move strict equality to in-depth exercises.

sadphi commented 3 years ago

I've now moved the exercise on strict equality to the in-depth exercises, and revised it to just be about analysing the behaviour.