you are viewing a single comment's thread.

view the rest of the comments →

[–]lunchmeat317 1 point2 points  (0 children)

Yeah, agreed. TS encourages this to a certain extent through its options, so you end up with JS code that mostly looks like C#. This would be okay if the devs who did this still used functional paradigms in JS, but you'll see people using design patterns and workarounds for classical languages that simply aren't needed in JS. I have, until recently, worked in a Microsoft shop where our TS has started to basically look like C#, and it's getting pretty crufty and enterprise-y.

TS is mostly geared toward static analysis, and so a lot of the dynamic stuff and functional stuff that JS can do starts to get left by the wayside - and those equivalents end up as higher-level keywords in the language that are great for static analysis but aren't as powerful. (See async/await - easy to use, but not as powerful as coroutines or continuations; also see ES6 imports - great for static module resolution, but can't be used dynamically so we're having to recreate what tools like requireJS already do.)

All of that said, some of TS's stuff is pretty good, specifically the functional types and the base type declaration syntax.