Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: LiteScript. Parent comment
- if you have a "class Token" and later do "var token", the type is guessed by name affinity.
- if you do:
token = .getToken() other = token
2. Type annotations: you directly state type
var other:Token var read: Token array
There are no comments on this comment yet.
- if you have a "class Token" and later do "var token", the type is guessed by name affinity.
- if you do:
the type of "other" is guessed from assignment (:Token)2. Type annotations: you directly state type
The compiler does a "pseudo-execution" of the AST, guessing types and validating property access.