Is anyone still sticking to #JavaScript instead of using #TypeScript? If so, why are you sticking with it? Please let me know your reasons!
8 replies
@hongminhee I don't like having to mess with extra build steps. I like typescript but not enough to justify the hassle.
Instead, I use asserts at the beginning of methods to check argument values and types, and sometimes for return values.
Along with good test coverage, I feel like this gives me some of the benefits of type declarations.
FYI, the latest Node.js can run TypeScript code directly without a build process using the node script.ts command.
@hongminhee For simple prototypes or small projects, where transpilation would be an unnecessary hassle (think single HTML file and JS with no or minimal dependencies), yeah. But for anything larger, TypeScript is the way to go. I cannot imagine maintaining a large project in pure JS.
@hongminhee I think Basecamp (and by extension, the Ruby on Rails defaults) have switched from TS back to JS a couple of years back. If I remember correctly, the rationale was that in their usecase (~lightweight UI on top of a Rails backend), types added more complexity than they solved problems.
@hongminhee I don't want another tool that needs to be added to the build pipeline.
I would perhaps change my mind if there was a typescript compiler that can be used using the default go tooling.
@hongminhee JavaScript is easier to generate than TypeScript (for compiler backends).
@hongminhee i don't feel like having a dependance on microsoft, they have already time and time again shown themselves untrustworthy for me. if there were multiple implementations and design was seperated, i would use it, but until then, it's a no for me
@hongminhee I still write JS because it has a specification. When I adventure into implementation-defined languages for the browser, I use #PureScript
I had great hopes for TypeScript when they were still maintaining the specification, but I dropped it once their solution to implementation drifting from specification was to retire the specification.
---
Also, I come from the camp that the only real type system is a static type system, like Pierce in "Types and Programming Languages".

