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

I'd like to see at some point browsers treating TS as a typed JS variant, and using the hints to speed up things perhaps too.



I think if you make things consistently typed (as typescript will help enforce), then your JS will run faster already. Because a lot of techniques JS JITs use are basically guessing the type of variables, and then bailing out into a slow path if it turns out they guessed wrong. Codebases like lodash make use of this, which is one reason why they're so fast.


Would be nice if Chromium picks it up which can be propagated to Chrome and Safari on desktop and mobile and Edge then to nodejs and others will surely pick it up if those adopt it.


That’d be terrible as the language version changes semantics.


So same as with plain JS?




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

Search: