3 ms·
Yes exactly. There must be some good reason why TS chose the syntax they did, because a lot of it feels very old-school-java.
by danielvaughn 5y ago
Yes exactly. There must be some good reason why TS chose the syntax they did, because a lot of it feels very old-school-java.
- stasm 5y agoType inference is one good reason. Similar syntax exists in a few modern languages, too: e.g. Rust and Swift. In languages with type inference it can be convenient that type annotations are in the postfix position relative to variable names: let user = new User(); let user: User = new User();