Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Microsoft Programming

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.

This discussion has been archived. No new comments can be posted.

TypeScript's Quiet, Steady Rise Among Programming Languages

Comments Filter:
  • JavaScript frameworks are being written in a language other than JavaScript?!

    *head explodes*
    • Re:Wait a minute... (Score:5, Informative)

      by sobachatina ( 635055 ) on Friday March 22, 2019 @12:42PM (#58316510)

      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.

      • How?

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

          • by Anonymous Coward

            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.

            • So the development cycle is now a three-step process?

              Great.

              • I guess you are too young to remember linking in C.

              • 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 Joce640k ( 829181 )

          By adding stronger typing to the language (hence the name "typescript") and better objects.

          Strong typing good. Mmmmmkay?

          • by Anonymous Coward

            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

            • Yes, that's why I use C++.

              • C++ attempts to implement typing, but since it doesn't impose enough rules to make guarantees about anything, it really can't be done. The thing on the other end of that pointer could be anything, or nothing.
      • 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

      • > 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)

          by pchasco ( 651819 ) on Friday March 22, 2019 @02:29PM (#58317072)
          No. The typescript compiler generates map files for your .ts, so you debug typescript not JavaScript.
        • by dbraden ( 214956 )

          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.

        • by fsck! ( 98098 )

          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.

      • by Wrath0fb0b ( 302444 ) on Friday March 22, 2019 @02:15PM (#58317020)

        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.

        • 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";

        • Comment removed based on user account deletion
      • 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?

        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. ... which you then had to link with the supporting libraries before you had something that could actually run.

        I don't like JavaScript, but I think I'll go look at TypeScript.

    • JavaScript frameworks are being written in a language other than JavaScript?!

        *head explodes*

      Typescript is transformed into regular Javascript by a "compiler".

  • about that syntax though. death to postfix types, I don't care if its easier for you to parse it, the point of higher level languages is to make it easier for humans not the computer.
  • by sobachatina ( 635055 ) on Friday March 22, 2019 @12:40PM (#58316494)

    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.

    • by Anonymous Coward on Friday March 22, 2019 @12:51PM (#58316576)

      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)

        by raftpeople ( 844215 )
        Python is a strongly typed language, so yes, it understands types just like Java. Maybe you are really referring to dynamic vs static?
        • 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!

          • 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

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

      • by ras ( 84108 )

        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

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

      • by lgw ( 121541 ) on Friday March 22, 2019 @01:21PM (#58316758) Journal

        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.

      • by PPH ( 736903 ) on Friday March 22, 2019 @01:53PM (#58316924)

        there a numerous tools that will validate your code

        Stop calling our users tools.

      • by ceoyoyo ( 59147 )

        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.

      • 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

    • by Anonymous Coward

      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

  • by Anonymous Coward

    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

  • 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

    • The weakness of Objective C is that it has the baggage of C still hanging around.
      The weakness of Swift is that it has the baggage of Objective C and C still hanging around.
  • The rise of the Rich Internet Applications has necessitated the need for strict typing. As such, I enjoy this TypeScript provided by our MS Overlords. However, ECMAscript is evolving quickly to catch up. TypeScript might get left on the side of the road as quickly as it was picked up.
  • by djbckr ( 673156 ) on Friday March 22, 2019 @01:27PM (#58316792)
    Lately our team has moved to TypeScript from Java to write server-side services. Now, Java is not the best thing in the world admittedly, but it's head and shoulders better than JavaScript. I think typescript is just a hack to make javascript a bit more palatable than straight JS. I think of "lipstick on a pig", but really typescript is just a really bad makeup job on a dead rotten pig.
    • by Anonymous Coward on Friday March 22, 2019 @02:09PM (#58317002)

      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

      • Javascript would be acceptable for the backend, and Node is very pleasant in a lot of ways......if it weren't for the whole hyper-attention-starved ecosystem of programmers that it imports with it. I swear Node programmers wake up in the morning thinking, "I haven't broken anything this week.....my life is incomplete. What can I do today to make phantomfive suffer?"
  • by Anonymous Coward

    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

  • Comment removed based on user account deletion
  • Microsoft .. TypeScript .. one of the most popular languages among developers, at least according to a report published by the analyst firm RedMonk this week.”

    Yet another free advert on slashdot for the MICROS~1 organization.

"Someone's been mean to you! Tell me who it is, so I can punch him tastefully." -- Ralph Bakshi's Mighty Mouse

Working...