typing - pannous/warp GitHub Wiki

optional typing and automatic typing through type inference gives developers flexibility on how and if they want their code to be typed

Lax and strict

Annotations make code strict, everything else is lax. Unannotated code behaves like Python: values are checked when it runs. Anything annotated (x: int, field types, implements, a declared parent type) is a promise the compiler enforces. warp --strict turns warnings into errors (strict, warning).

class Shape{name}
class Circle extends Shape{r:int}
s = Circle("a", 2); s.r          // lax: works
s: Shape = Circle("a", 2); s.r   // strict: compile error, Shape has no field r