Me, replying to a question about TypeScript: Sorry, I don’t use TypeScript for the same reason I don’t code in Java and transpile to JavaScript :)

Wait, you don’t think…

*goes to check…*

Sweet jeez, of course someone’s made a tool for that…

*smh* :)

· · Web · 5 · 0 · 5

Don’t get me wrong: your IDE using/intuiting TypeScript type definitions to help you code: great.

Coding in TypeScript: not so great.

(Which shall become apparent in five years’ time for all the reasons no one writes CoffeeScript today.)

I mean, heck, enterprise folks have been trying to make JavaScript into Java for as long as I can remember. It’s the reason ECMAScript 4 was abandoned in the ActionScript days. The fallout literally held JS back for a decade until ES6.

@aral years ago as a side project I wrote an experimental transpiler that created Arduino C++ code from a JavaScript+Canvas game you wrote for the Arduboy tiny gameboy-imitator.
THAT is the only correct direction to transpile JavaScript 😤😤😤😅

For js I use FlowType because it allows you to put all of the type info into comment syntax and then the js itself is still valid js which will run in any js engine.

@cjd Neat, yeah, type definitions have great value. They just don’t need to strangle your use of a dynamic language. Was just writing this:

@aral the idea, as brendan eich kept saying, was to support “programming in the large”.

and, well, they wanted to be able to write large javascript programs, and downloading large javascript programs is what we got

@aral vscode works well with just JSDoc, and it kinda cover all the typing of Typescript tbh

@aral interesting take. I always though CoffeeScript is dead because it wasn't widely adopted.
Typescript OTOH is widely adopted and supported by the majors framework.

In my experience writing Typescript or Javascript is the same pain : you have to manage webpack and all the fucked up js toolchain.

If you only need to support modern browsers, you could just not use webpack and use ES6 modules.

@aral It is worrying where Deno is going with TS "as a path to programming in Rust." Because who needs Rust if you have Deno??

@aral maybe TS becomes part of the original JS like with many othet things 🤷🏻‍♂️.

What do you use now btw for helping our your types? I’ve seen some vanilla js code where they define types.

Sign in to participate in the conversation
Aral’s Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!