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

But it's the minimal translation to allow newer language features and APIs to be still used in older browsers.

OTOH I haven't seen a pure JavaScript project for a number of years. It's all Typescript now, maybe with some vestiges of legacy JS slated for eventual migration to TS.




There are people who insist on writing JS (with types in JSDoc), but Svelte is the only such project I can name off the top of my head.


I tend to start off a project with typeless zero-build JS, because I've been working with dynamic languages so long that the types mostly don't actually help me find bugs in the early days, but if I don't convert it to reasonably typed TS before I release a 0.001.001 then I would expect people to judge me for it, and I would consider them to have every right to do so.


Much of it is such minimal translation.

Much, not so much.

I see JSX as basically 'compiling augmented javascript to javascript,' much of decorators is much like that as well, and things like e.g. vue's turning expressions on its reactivity based signals seen in templates into something more clever is also in the category I was trying to gesture at.

(TS is awesome but I should've predeclared that it wasn't really what I had in mind, sorry for any confusion induced by that mistake on my part)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: