Hacker News new | past | comments | ask | show | jobs | submit login

Typescript makes virtually no changes to JS syntax, except what's necessary to support types.



TypeScript classes, constructors and enums say hi.

Talk about moving the goalposts...


No one is moving the goalposts. TypeScript's raison d'etre is to add static typing to JS. Reason's is to fix the syntax.

(Yes, TS adds new grammatical constructs, but grammatical constructs are about grammar, not syntax, contra Reason).


Maybe I just don't have enough experience, but I use classes in Javascript and TypeScript, as well as constructors, and they look virtually identical to me. What am I missing here?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: