Hacker News new | ask | show | jobs
by pjam 1751 days ago
> the dynamism of js is disappearing

As an outsider, really curious to hear more about this. Is it from an ecosystem point of view, where the "dynamism is disappearing" or more from a day to day, the fact that writing TS is significantly different than writing JS? Or even something else?

2 comments

There are a few patterns that TS simply cannot or is too painful to handle. I still have no idea how to define a class the old way with prototypes in Typescript, which I really only discovered when I ran into some edge cases around how static members and methods in the new class syntax were typed.

You also lose the "type out code really quickly without thinking too hard about it" and the thrill of wondering if it'll work when you load the page.

"Thrill" is an interesting way to put it.
It didn't always, but it sure felt good when it did on the first try!

Needless to say, my scripting nowadays is almost exclusively Typescript.

with dynamic language and yeah a multi-paradigm language like js, means you can come up with patterns a compiler can never expect. because javascript is so flexible, your code ends up like a mini dsl yet still remains readable javascript. with typescript, you won't have much flexibility. you lose a lot of productivity fighting the tool i.e typescript compiler