TypeScript's Quiet, Steady Rise Among Programming Languages (wired.com) 138
Microsoft's programming language TypeScript has become one of the most popular languages among developers, at least according to a report published by the analyst firm RedMonk this week. Wired: TypeScript jumped from number 16 to number 12, just behind Apple's programming language Swift in RedMonk's semiannual rankings, which were last published in August. Microsoft unveiled TypeScript in 2012, and while it hasn't grown as quickly as Swift -- which has grown faster than any other language, ever since RedMonk started compiling the rankings in 2011 -- TypeScript's own ascendance is impressive, given the sheer number of available programming languages.
More and more applications these days use TypeScript. Google's programming framework Angular, the second most popular tool of its type according to data released last year by the startup NPM, is written in TypeScript. So is Vue, an increasingly popular framework finding a home both among smaller companies and tech giants like Alibaba. But RedMonk doesn't look at how many jobs are available for people skilled in a particular language, nor how many companies actually use the language. Instead, the firm tries to spot trends in developer interest by looking at how many projects on GitHub use certain languages, and how many questions are asked about those languages on the programmer Q&A site Stack Overflow. The idea is to get a sense of where the software development profession is heading.
More and more applications these days use TypeScript. Google's programming framework Angular, the second most popular tool of its type according to data released last year by the startup NPM, is written in TypeScript. So is Vue, an increasingly popular framework finding a home both among smaller companies and tech giants like Alibaba. But RedMonk doesn't look at how many jobs are available for people skilled in a particular language, nor how many companies actually use the language. Instead, the firm tries to spot trends in developer interest by looking at how many projects on GitHub use certain languages, and how many questions are asked about those languages on the programmer Q&A site Stack Overflow. The idea is to get a sense of where the software development profession is heading.
Wait a minute... (Score:1)
*head explodes*
Re:Wait a minute... (Score:5, Informative)
Typescript is basically JavaScript syntax with some extra type information tacked on. It runs through a compiler that produces javascript.
I'm a fan. If you do anything even moderately complex in JavaScript you should look at Typescript. It eases a lot of the pain of using JavaScript.
Re: (Score:2)
How?
Re: (Score:2)
For some reason having a compile step in the process makes developers feel important.
Snark aside, the biggest problem with Angular, Jquery... is that we often need to include or link to a large Javascript library, for most good designs only using less then 1% of the libraries features.
Re: (Score:2)
Code barista. I like it.
Re: (Score:1)
There is something called rollup.
It can take all your site's JS, put it into a single file, minimize it, and then it does "tree shaking" where it removes all the calls from those large libraries that are not used.
Pretty easy, works pretty well.
Re: (Score:2)
So the development cycle is now a three-step process?
Great.
Re: (Score:2)
I guess you are too young to remember linking in C.
Re: (Score:2)
Yes.
We will ship no code, until it compiles _and_ links. Then we zip up the source (for 'source control'), ship and go to the nudie bar for two weeks.
Debugging is for the end users. It's all their fault anyhow, we hate them.
Re: (Score:2, Interesting)
By adding stronger typing to the language (hence the name "typescript") and better objects.
Strong typing good. Mmmmmkay?
Re: Wait a minute... (Score:1)
If you have experience with complex projects you know run-time errors are incredibly destructive. It's always best to keep as many potential errors in compile-time
Re: (Score:2)
Yes, that's why I use C++.
Re: (Score:2)
Re: (Score:3)
I'm a fan. If you do anything even moderately complex in JavaScript you should look at Typescript. It eases a lot of the pain of using JavaScript.
Count me in as a fan as well.
I never really cared for programming in JavaScript myself although I did it because that was the job at hand.
Then I started learning Angular, and learned Typescript by following the Angular lessons. Rarely did I have to go back to the Typescript reference page. And predictably enough my JavaScript skills improved because I was writing more of it to integrate JavaScript libraries into my Angular applications.
What I learned really was that strong type checking is really
Re: (Score:3)
> It eases a lot of the pain of using JavaScript.
How is debugging TypeScript? Do you have to wade through obfuscated JavaScript?
Re: Wait a minute... (Score:4, Interesting)
Re: (Score:2)
Should have pretty good support. The IDEs like VSCode can use "source maps" that are generated automatically during the transpile process. These files map the generated javascript to the original source. I'm not a typescript/javascript developer but I think I got the gist of it right.
Re: (Score:2)
Transpiled doesn't necessarily mean obfuscated. The output of the typescript compiler is almost identical to the input, but with the type annotations removed. It also includes inline sourcemaps so your stack traces continue to be readable. Honestly, it's not a problem.
Re:Wait a minute... (Score:5, Insightful)
Because it was easier to write a sane language and a transpiler than it is to fix the recursive dumpster fire that is JavaScript.
That should really tell us something folks.
Re: (Score:2)
Considering JavaSchit was designed and implemented in 10 days and learning NOTHING from BASIC what do you expect?
Run-time errors SUCK. Absolutely insane that you have to use this string literal HACK to turn on type safety:
"use strict";
Re: (Score:1)
Re: (Score:2)
Typescript is basically JavaScript syntax with some extra type information tacked on.
Oh!! So it's RATFOR (1976) [wikipedia.org] for JavaScript. Why didn't you just say so?
... which you then had to link with the supporting libraries before you had something that could actually run.
Hell, for that matter back in 80-ish I used a C compiler with 4 separate phases. Phase 1 was macro expansion only, the other 2 started compiling the code until the phase 4 produced linkable output.
I don't like JavaScript, but I think I'll go look at TypeScript.
Re: (Score:2)
JavaScript frameworks are being written in a language other than JavaScript?!
*head explodes*
Typescript is transformed into regular Javascript by a "compiler".
Re: (Score:2)
They call it a "transpiler."
Re: (Score:1)
Re: (Score:1)
Re: (Score:1)
sort of like you call people "sickos" and "sad" when we all know it's you chris you irritating fat failure
What proof do you have that I'm Chris? You didn't know I existed until I commented on CaptainDork's article submission. Before me you were accusing CaptainDork of being not only Chris but also a 36-year-old woman inside a 72-year-old body. Before that it was... Joe_Dragon?
who the fuck keeps modding this shitmoth up
Proof that I'm not Chris. Think about that, asshole.
Re: (Score:1)
Too bad (Score:2)
Re: (Score:1)
Let's call it LCF: Language Construction Format (or Large ClusterFuck.)
Re: (Score:2)
I thought they called that C++. Every C++ program I've ever seen looks like someone started by specifying their own language.
Instant Language Builder [Re:Too bad] (Score:1)
That idea was pondered at C2: http://wiki.c2.com/?InstantLan... [c2.com]
Re: (Score:2)
So is it ok to call it a new language?
It is a superset.
Typescript has restored my job satisfaction (Score:4, Interesting)
I moved from C++ to javascript as part of a very advantageous job change.
Unfortunately javascript shortly made me loathe coming to work.
We ported all our code to TypeScript and I get to feel like a real programmer again.
Strict typing is a beautiful thing. Refactoring and compile time bugs instead of runtime disasters.
Re:Typescript has restored my job satisfaction (Score:5, Insightful)
Amen.
Right now I am programming in Python and, coming from a Java and C background... all I can say is that Python is the new Perl.
You have to be a certain age to really get that comment.
Types, do you UNDERSTAND them, motherfucker!
Javascript is a disaster like all weakly typed languages, but Typescript is a miracle that may rescue web development. Absolutely beautiful work, brought to you by Anders Hejlsberg, the man who also created Turbo Pascal, Delphi, and Objective C. In other words, a man who has experience and proven results creating practical and elegant languages. Not made by some guy over a weekend.
Re: (Score:3, Interesting)
Re: Typescript has restored my job satisfaction (Score:1)
No, it does not understand types just like Java.
Keep telling yourself that a language that lets you pass literally anything into a method and also lets you return literally anything is strongly typed.
This is the most BASIC feature of a typed language!
Re: (Score:3)
Keep telling yourself that a language that lets you pass literally anything into a method and also lets you return literally anything is strongly typed.
Python knows exactly what types you're passing. Python is a strongly typed language, unlike, for example, C. If you pass "NULL" to a C function that expects a buffer, you're likely to get a runtime crash and/or security exploit. If you pass "None" to a similar Python routine, the Python interpreter will throw an appropriate exception instead.
Language typing has two different orthogonal concepts: strong vs. weak, and static vs dynamic. Dynamic/static determines whether variables are supposed to hold a certai
Re: (Score:3)
Python knows exactly what types you're passing. Python is a strongly typed language, unlike, for example, C. If you pass "NULL" to a C function that expects a buffer, you're likely to get a runtime crash and/or security exploit. If you pass "None" to a similar Python routine, the Python interpreter will throw an appropriate exception instead.
This is sophistry attempting to cover up the weakness of the Python type system. And by weakness, I mean the lousiness of it. English polymorphism, fuckers.
Re: (Score:2)
Enjoy your buffer overruns.
Re: (Score:2)
Re: (Score:2)
Yeah, using some moronic allusion to "English polymorphism" to try to weasel out of the standard definition of strong vs weak typing.
Re: (Score:2)
This is sophistry attempting to cover up the weakness of the Python type system.
His argument seems far stronger than yours.
Re: Typescript has restored my job satisfaction (Score:2)
Re: (Score:2)
Python has it's own version of Typescript. It's called Python 3.6. In other words, since 3.6 Python has included the syntax for static type checking as part of the language. It doesn't actually check the types mind you, a separate tool does that: mypi. Still, it's a definite improvement on needing a separate language which is the situation Javascript finds itself in for now.
Much as it pains me to say this, the language that has retrofitted types the best is PHP. If the types are present it does check t
Re: (Score:2)
I don't get the point of this language hate.
It is about using a language that suits the needs for the development project.
JavaScript is a Scripting Language. Don't expect Strict Typing, If you like this sort of thing, be disciplined enough to strictly type the use of you code.
so
var intX = 0
var strY = ""
In terms of compile time bugs, vs run time disasters, there a numerous tools that will validate your code.
Re:Typescript has restored my job satisfaction (Score:5, Insightful)
var intX = 0
var strY = ""
Sure, and everyone can have their own syntax for this, and not have their IDE warn them when they forget. Or, you know, it can be part of the language, making it a standard for all, including the IDE, and removing the need for the Hungarian notation clutter everywhere.
In terms of compile time bugs, vs run time disasters, there a numerous tools that will validate your code.
Yes, and a popular one is Typescript.
Re:Typescript has restored my job satisfaction (Score:5, Funny)
there a numerous tools that will validate your code
Stop calling our users tools.
Re: (Score:2)
Re: (Score:3)
That would be fine, if JavaScript were *used* as a scripting language. Back in the old days, when you just wanted to make a button on your web page change colours or something, cool.
Problem is, Javascript today is used as a programming language, to write real (sizeable) programs that incorporate a decent amount of their own logic.
Re: (Score:2)
I don't get the point of this language hate.
Nerds have to rant about something, right?
Personally, I prefer to rant about how stupid Google product managers are. Some people, however, go apoplectic when they see any dynamically typed language. And by then, golly gosh, comes the points about how JavaScript is associated with the web, and all its brokenness, and somehow, that means that anyone who programs in JavaScript is just a hipster trying to pretend to be a professional programmer. And of course, let's not forget to bring up the point that Java
Re: (Score:1)
When you are accustomed to strict typing, you rely on it, and miss it when it is gone.
When you are accustomed to weak typing, you develop a coding mindset for it, so you can naturally keeps the bugs under control. Once you have such a mindset, being forced into a strict typing environment feels needlessly constraining.
So I would expect this is just another situation where some people love it, some hate it, and both feel completely justified in their position.
About a decade ago when I tried to get into Java
Microsoft: A Fart in a Skillet (Score:1)
Is Microsoft even looking at long-term TypeScript development when they seem to be taking a parallel route with Blazor/WebAssembly? What's the future of .Net Framework with Core and Standard making things super confusing? What's the future of Windows as a development environment with them salivating over the mobile userbase? They've been demoting all their traditional host-your-own products and pushing people into Azure Cloud. As an employee who works behind a firewall and relies on self-hosted products and
Re: (Score:2)
Misleading article (Score:2)
I suspect the main reason they measure github projects and stackoverflow questions isn't because they think those are good ways to measure, it's because it's the only publicly available information they have access to.
Swift's rise in popularity isn't due to Swift being a good language, it's due to 1) Apple killing ObjectiveC 2) ObjectiveC being so backwards
Re: (Score:2)
The weakness of Swift is that it has the baggage of Objective C and C still hanging around.
Dont discount ECMAscript (Score:1)
Re: (Score:1)
TypeScript is still crap (Score:4, Interesting)
Re:TypeScript is still crap (Score:4, Insightful)
The real failure here is a scripting language designed for web browsers being used for back end services. DON'T DO STUPID SHIT!
If you want to use a scripting language on the back end, that's fine, but use a scripting language designed for back end work.
TypeScript is imperfect, but leaps and bounds ahead of plain of JavaScript for front end work
Re: (Score:2)
Javascript compilers! (Score:1)
Between Typescript and Grunt, I've learned to loathe JS compilers (and I already hated NodeJS). If you *need* a compiler for Javascript, then you are doing language design wrong: Fix the language, don't write a compiler for it! A compiler in the develop-test lifecycle dramatically extends the development cycle and, in web dev work, that just slows everything down. Good for job security but not much else. I can and do build bug-free JS solutions in...Javascript!
Typescript was a dead horse at the startin
That's an overstatement (Score:2)
Re: (Score:2)
Languages are _easy_, libraries are hard.
But language features (or their lack) have huge consequences in the library.
Everybody has to 'touch Javascript', if only to block 'big old steaming piles' of it. It sucks and everybody knows it. But until recently, it was the only game in the browser.
Then you have the 'it's a pigfuck, but it's our pigfuck' people. They actually use JS on the server, just madness. In their defense, most don't know any other languages.
Bluntly, it's kids reinventing _all_ the b
Re: (Score:2)
You can hate something AND make money off of it.
Re: (Score:2)
Microsoft TypeScript most popular says Microsoft (Score:2)
Yet another free advert on slashdot for the MICROS~1 organization.
Re: (Score:2)