Skip to content
This repository was archived by the owner on Apr 9, 2022. It is now read-only.

Semantics

Seyedamirhossein Hesamian edited this page Dec 27, 2021 · 7 revisions

Semantic rules:

  • Class called Driver should not have any formals because it is the entry point
  • No shadowing of variables whatsoever
  • Names in typed arms should be unique
  • Upon overriding a function, the formal types should be superset equals of parent level formal types
  • Match arms should narrow down that type and not broaden it
  • No duplicate class name
  • Any is the root type
  • If class does not extend any other class, then it is implicitly extending Any
Clone this wiki locally