Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I get CoffeeScript vibes from TypeScript, and look at where CoffeScript is now.


I don't get this. What do you mean by coffeescript vibes? They are super different languages...


In that JavaScript only needs to adopt a few of its features for the benefits of welding yet another compiles-to-JS toolchain on to projects to dwindle in comparison to writing ES8+.


The difference between CoffeeScript and TypeScript was that CoffeeScript offered syntax that people preferred, whereas TypeScript provides write-time checking of errors. It is more similar to ESLint in that regard, and is better understood as a linter than as a separate language like CoffeeScript.

Even if TS's type annotations would be added to the language (like it practically almost has been, through Babel supporting it), you'd still want to run a tool as you write it to actually check that those annotations are adhered to, rather than having your code crash on the user when they are not. TypeScript is that tool.


Adding optional type annotations to JS would be interesting. It might help with VM optimization.


Python already does type annotations, and I have no use for Mypy other than using it for type checking in my editors via LSP. I don't import it or use it as a dependency at all in projects.

I feel like JavaScript adopting type annotations in a similar manner will make TypeScript look the same as Mypy in many regards: nice to have, but not necessary most of the time because the parent language ships with most of its features.


> and look at where CoffeScript is now

Largely absorbed by modern javascript? ;-)


If you look below, this is my point. It's inevitable for JavaScript to adopt most of TS' flagship features.




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

Search: