Why I do not like Typescript, and why I don't think it will persist.


Most people reading this wont remember Microsoft Frontpage - the html editor that published features that didn't work as standard on the web and required the installation of frontpage extensions on the web server.

Yeah, ugly.

Some may not even remember Active-X controls. Another Microsoft web technology that was notoriously buggy and insecure, but rivalled java in providing app level functionality in the browser.

Then there was Microsoft's Silverlight, their completely unnecessary answer to Flash.

Then there was J-Script, their original response to Javascript in Netscape, and kinda, but not quite compatible with Javascript. Is this sounding familiar?

I guess while we're here we should mention IE, and the years of 90-98% compatible nightmares it gave web developers.

You'd think Microsoft would have given up forcing proprietary web tech on us, especially in the post Flash days of standardised web technology.

They even gave up the IE engine for Chromium in their Edge  browser. Hooray!

So now, everything is IEEE, W3C agreed, open standards-based, even accelerated 3D is open and agreed upon.

Just get a text editor and start writing Javascript, right?

Wrong! They've found another way to proprietise web technology and obfuscate basic, standards based native web development.

Typescript.

I get there are features that have been slow to arrive in JS, I liked TS for its arrow functions and Classes, but we waited, and we now have them in native JS.

Strict typing, after which the language is named, is a great feature, but - pandering to the desires of C# developers is not what we should be doing. Either it will end up in JS because it's such a compelling feature, or it will never make it to the language because it will slow down the JSVM.

If it's the latter, we need to deal with it, and there are ways to develop with strict typing and make it a feature of the tools. Indeed, that's what TS is now, just a toolset feature, you don't run TS in the browser, it's all JS, or compatible bytecode/wasm.

Defining it as a language actually isn't necessary, any more than making prettified code, or tabs instead of spaces*, or snippets into a Javascript superset and trying to get the entire dev community all using the same protocols.

We have tooling/linting to cover developer preferences, and we have the likes of Rust, C, C++ to Wasm for developers who want something a bit stricter.

Then there's the problem with the code I'm writing not being the code the browser runs, that's killing one of the most beautiful features of web development.

I mean, use Typescript if you want, but don't sell it to me as 'it's almost the same as JS, JS is actually valid TS', and then throw a hissy fit if I use that justification for continuing to use JS, because well, it's valid TS.

JS is an incredible language, but it's complex enough, without wearing another language shaped mask of abstraction, and it will continue to evolve, and make more and more TS redundant, and in the exceptional cases where it can't - there's a valid performant reason for that.

Vanilla JS is OOP, functional, procedural, declarative, and it does all that without a formal compilation step, newcomers can (technically) see the very code you wrote, and that's a wonderful feature of the language. Obfuscation is available if you absolutely need to hide things.

If you don't like coding for the browser in it's native language - instead of validating another bad attempt by Microsoft to mutate and blur web technology, maybe just... don't?

Update: These were my first thoughts about Typescript, and a suggestion that it might be Microsoft history repeating itself. I've since discovered that there is probably way more to this, and a further article about how this fits into long term MS strategy of: Embrace, Extend, Extinguish. Is in the works.

*If you want to put spaces in between words you use the space key, if you want to apply tabbed indentation, you use the tab key. The clue is in the name.

Post a Comment

Previous Post Next Post