Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion on course dev for 2021 given Scala 3 #509

Closed
11 tasks done
bjornregnell opened this issue Nov 8, 2020 · 2 comments
Closed
11 tasks done

Discussion on course dev for 2021 given Scala 3 #509

bjornregnell opened this issue Nov 8, 2020 · 2 comments

Comments

@bjornregnell
Copy link
Member

bjornregnell commented Nov 8, 2020

I'd like in this issue thread discuss the general plans for adapting the progression to Scala 3. You can read more about Scala 3 here: http://dotty.epfl.ch/docs/index.html

Before: the (soon old) Scala 2 version of this course

As a reminder and baseline, here is the progression from 2020:

W Datum Lp V Modul Förel Övn Lab
W01 31/8-4/9 Lp1V1 Introduktion F01 F02 expressions kojo
W02 7/9-11/9 Lp1V2 Program F03 F04 programs --
W03 14/9-18/9 Lp1V3 Funktioner F05 F06 functions irritext
W04 21/9-25/9 Lp1V4 Objekt F07 F08 objects blockmole
W05 28/9-2/10 Lp1V5 Klasser F09 F10 classes --
W06 5/10-9/10 Lp1V6 Mönster, undantag F11 F12 patterns blockbattle
W07 12/10-16/10 Lp1V7 Sekvenser F13 F14 sequences shuffle
KS 28/10 TP1 KONTROLLSKRIVN. -- -- --
W08 2/11-6/11 Lp2V1 Matriser, typparametrar F15 F16 matrices life
W09 9/11-13/11 Lp2V2 Mängder, tabeller F17 F18 lookup words
W10 16/11-20/11 Lp2V3 Arv F19 F20 inheritance snake
W11 23/11-27/11 Lp2V4 Språkskillnader F21 F22 scala-java javatext
W12 30/11-4/12 Lp2V5 Sortering F23 F24 sort --
W13 7/12-11/12 Lp2V6 Repetition, tentaträning, projekt F25 F26 examprep Projekt
W14 14/12-18/12 Lp2V7 Extra F27 F28 extra --
T 11/1 TP2 TENTAMEN -- -- --

After: the Scala 3 version of this course

Potential great benefits to beginners:

  • Top level definitions (toppnivå-definitioner) -> this is natural, perhaps explain how cool it is compared to java, similarity to python etc in w02 programs.
  • Enums (uppräknade datatyper) --> enum Event in w05 classes, BlockWindow - compare case object and enum? also in w06(?) patterns there are case objects than can be transformed to enums; add slide after pattmat and case object to show patmat and enums?
  • Export Clauses (exportklausuler) --> w04 objects (name spaces) https://youtu.be/dh61X4GZmvg
  • Optional braces (valfria) --> w01 introduction, w04 objects (name spaces)
  • Main functions with @main (huvudprogramsfunktioner) --> w02 programs
  • Extension methods (extensionsmetoder)
  • New Control Syntax (ny syntax för kontrollstrukturer)
  • Trait Parameters (trait-parametrar)
  • Intersection types (snitt-typer)
  • Union types (union-typer)
  • Universal Apply Methods aka constructor proxies (hur översätta?) --> w05 Classes

Some ideas to investigate:

  • Change title of w05 classes to types? or data?
  • Add orderings and linear search and sorted, sortBy to wwek07b on sequences and skip week sorting? check what it isn week sorting and spread those things out; maybe have a topic "algorithms" or perhaps "algorithms and data modelling" or perhaps "algorithms and api:s" instead?
  • How can blockmole and/or shuffle take advantage of enums?
  • Candidates to be deleted:
    • Sorting
    • Java
  • Candidates to be included or expanded:
    • what is a good API? focus more on api usage and creation
    • include more on creating genericstructure in simple use cases
    • contextual abstraction, e.g. simple type classes with using and given

A tenative new progression

A tentative Scala 3 progression is available here:

New stuff in Scala 3 that is probably not in scope, but some might perhaps be mentioned

  • Type lambdas

  • Match types

  • Dependent Function Types

  • Metaprogramming

  • Multiversial equality

  • Super Traits

  • Opaque Type Aliases

  • Open Classes

  • Kind Polymorphism

  • threadUnsafe Annotation

  • Explicit Nulls

  • Safe Initialization

  • Numeric Literals

  • Structural Types

  • Wildcard Types

  • Implicit Conversions

Discussion below is welcome!

@bjornregnell bjornregnell changed the title Tentative plannig for Scala 3 Discussion on course dev for 2021 given Scala 3 Nov 8, 2020
@bengterik
Copy link
Contributor

I think the introduction of API's would be interesting. In EITF65 Digitalteknik we got to create our own processor which we then got to use ourself to build a program. That exact task is a bit outside of the scope of this course but I think that creating your own API and reusing it can be an illuminating task :)

One idea would be to let the students implement some of the functionality in introprog such as line(), fill() etc. which they can use later in their graphical components. Might be too early to do this in labs BM and BB but it could perhaps be done leading up to lab Snake. Another candidate for API's could perhaps be in the Bank project with some sort of database.

On the topic of testing I think that lab Life would be a good candidate for letting the students develop their own tests, as many students seem to get intricate bugs with rows/cols etc.

@bjornregnell
Copy link
Member Author

closing this old issue as we are post migration and most of it was implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants