Is anyone still sticking to #JavaScript instead of using #TypeScript? If so, why are you sticking with it? Please let me know your reasons!
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.
@Razemix Yeah, for simple projects, transpilation would be overkill indeed. By the way, that's why I'd preferred Deno over Node.js. Node.js also transforms TypeScript code by default though.

@hongminhee @Razemix For simple Node projects you can use typescript since `node somefile.ts` works

If you use `erasableSyntaxOnly` to develop the typescript files Node can run them.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-8.html#the---erasablesyntaxonly-option

Documentation - TypeScript 5.8

TypeScript 5.8 Release Notes

@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.
@gosha Haha, I've always had my doubts about Rails' aesthetics.
@hongminhee Ha, I can't say the same (I worked with Ruby/Rails for a big part of my career) but there's been some questionable things going on with the leadership for sure 😞
@hongminhee JavaScript is easier to generate than TypeScript (for compiler backends).
@abnv Yeah, that's fair enough indeed!
@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
@SRAZKVT Yeah, its governance is indeed problematic. I hope they migrate their governance on TypeScript to an independent foundation.

@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.

@mariusor Deno might be it, but it's run by a VC-funded startup… 😂

@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.

@evan I'm not sure if you'll like it, but why don't you give Deno a try? You can run .ts files directly without a separate build pipeline.
@hongminhee that's exactly the kind of tool chain change I don't want to do!
@evan Haha, well if that's the case, how about upgrading to the latest version of Node.js? The latest Node.js version can run TypeScript files natively!
@hongminhee hahaha ok ok fine, I'll try it!

@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".

@hongminhee @abnv Hi, only for projects with a very small feature set, personal ones, not for sharing with others - where the JS can be embedded in the HTML, and not require a build step. If such a project starts to grow, or if I decide to add tests, then I have to break out the proper engineering toolset. But, JS is quite abysmal on its own. As is the whole stinking npm ecosystem, but we have what we have I guess.