Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming

Python and TypeScript Gain Popularity Among Programming Languages (venturebeat.com) 50

GitHub has released its annual Octoverse report, revealing trends in one of the largest developer communities on the planet, including a spike in open source project activity following the start of the COVID-19 pandemic. VentureBeat: JavaScript continues to be the most popular programming language on GitHub, while Python is now the second most popular, followed by Java and the fast-growing TypeScript community. Maintained by GitHub owner Microsoft, TypeScript has climbed from seventh place in 2018 and 2019 to fourth overall this year. PHP and Ruby, languages that ranked among the most popular five years ago, continued to decline in popularity.
This discussion has been archived. No new comments can be posted.

Python and TypeScript Gain Popularity Among Programming Languages

Comments Filter:
  • by Anonymous Coward

    From their page: Types provide a way to describe the shape of an object, providing better documentation, and allowing TypeScript to validate that your code is working correctly.

    What does this even mean? How does a piece of code have a shape? Like the code is a hexagon?

    • What does this even mean? How does a piece of code have a shape? Like the code is a hexagon?

      Its a new and trendy form of inheritance that uses dumbshit terminology like "shape" to advertise how its implemented differently than normal.

      • How would you describe the same concept: Layout? Structure? How are those different or superior than 'shape'? I fail to see the problem or confusion with using shape as a descriptor in this case. Going from the amorphous blob that is a JavaScript object to the structured definition that is a TypeScript object I would think any experienced programmer would immediately understand what that description meant.
        • Shape implies a known form. Square, rhombus, octagon, etc etc. Code doesn't seem to fit that word.

          • Nope. There's a lot of different usages. "The shape of things to come", "Get myself into shape" etc. Even in the most stringent mathematical usage you can't say that it has a "known" form - are you saying a shape is only limited to something with a described name? What about the boundaries of a country? Is that not a shape? If I define a type hierarchy and connect edges in that hierarchy to sub types and associated types, wouldn't the resulting graph have a shape? Shape is absolutely an acceptable ter

          • Those are geometric shapes. Perhaps it depends on one's internal model of code. As a very spatial thinker the word 'shape' is a very good description of what I see in my head when thinking about code.

            Likewise if we look at shape synonyms [thesaurus.com] it lists architecture, configuration, and model. All of those are pretty common when talking about code so, to me, shape doesn't even give pause when reading it in this context.

          • Code doesn't seem to fit that word.

            Why not? You could actually apply it to several properties of code. V8 did that, for example. [mathiasbynens.be] (Actually it did that seemingly in a meaning compatible with the article sentence above.)

      • Or, might it be, that some people without autism aren't counting beans, atom by atom, and understand abstractions, analogies, and can derive them from novel usages of words by themelves, including the resulting subtle nuances.

        TL;DR: You need to go outside every once in a while, once this is over.

    • You need to be able to think a bit more fuzzy, if you want to survive in the real world. You know: More fuzzy and with awarenes of different contexts and analogies, and less like a autistic computer, no offense. :)

      "Shape" in this context means its interface. You know: How you define something by what you can measure about it from the outside. Quacks like a duck and all.
      Everyone gets that.

      • by narcc ( 412956 )

        No.

        There is no difference between these two statements in this context:

        Types provide a way to describe the shape of an object

        Types provide a way to describe an object

        It's stupid, pointless, and adds no value.

    • Re:TypeScript (Score:5, Interesting)

      by CubicleZombie ( 2590497 ) on Thursday December 03, 2020 @12:48PM (#60790398)

      From their page: Types provide a way to describe the shape of an object, providing better documentation, and allowing TypeScript to validate that your code is working correctly.

      What does this even mean?

      Ignore the marketing BS.

      TypeScript is awesome. It takes 75% of the reason I HATE JavaScript and fixes it. It adds type safety. It adds functional intellisense and code completion (on VS Code). It makes cleaner code. It makes JS development so much faster and the end product so much more reliable. And it works everywhere because it compiles down to plain old JavaScript.

      I've been on so many NodeJS projects that require 100% unit test coverage, which more than doubles development time and is basically worthless in a non-typesafe environment. Ditch that. Use Typescript. That one change will add more quality than any amount of unit tests and with no effort.

      Yes, it's just window dressing on a fundamentally flawed language, but it works.

      • by narcc ( 412956 )

        Not really. All it does is let you pretend that JavaScript is more akin to C# or Java. You get to use all of the outdated development techniques you've clung to over the last 20 years.

        If you take the time to properly learn the language, you'd never go back to TypeScript.

        • Re:TypeScript (Score:4, Interesting)

          by Moridineas ( 213502 ) on Thursday December 03, 2020 @01:46PM (#60790728) Journal

          Genuinely asking -- can you share an example of what kind of techniques of constructions you're talking about?

          • I'm also wondering. I mean, I do want to learn new techniques. I wonder if they know other languages have also advanced along with Javascript. The only immediate technique that strikes me as unique to JS as opposed to C# would be prototype based construction as opposed to class based construction.

        • Re:TypeScript (Score:5, Insightful)

          by Junta ( 36770 ) on Thursday December 03, 2020 @02:12PM (#60790818)

          Looking at TypeScript, it seems like if I'm going to work on someone else's code, I think I'd much rather them have written TypeScript than direct Javascript.

          If I'm writing myself, I might prefer JavaScript as it can be a little less tedious.

          All that said, TypeScript output is actually human readable Javascript, and given the tedium adds value for other people later and perhaps myself later, it seems to be worth it.

          • Re:TypeScript (Score:5, Insightful)

            by Krishnoid ( 984597 ) on Thursday December 03, 2020 @03:07PM (#60791000) Journal

            "Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write." Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

            It's also just courteous to the next sucker who has to read the code, and probably good karma.

            • And sometimes that next person is just the person who wrote the code, but a year or two later when they have to go back and add a feature or fix a bug and forgot what the old code does.

          • by narcc ( 412956 )

            This isn't an easy discussion to have in an online format, particularly as we're operating from a different set of initial assumptions. For example, the bureaucracy and methodologies that come with conventional OOP I see as a primary cause of complexity -- not a means to manage it. You are not likely to agree with that statement, though it's not as heretical as it would have been even just 10 years ago.

            The is the simplest way I can think to put this in the moment, and it will very likely be meaningless

  • Situation among everyone else who's not the type to use GitHub: Unknown.

    See also: "Study claims X!" . . . "... in mice".

  • And tomorrow it will some other set of languages/frameworks from some other website. "I asked 300 Typescript programmers what programming language they used - Surprise, Typescript is popular!"

  • by wargarden ( 2592697 ) on Thursday December 03, 2020 @01:05PM (#60790496)
    it doesn't actually make the code any safer, since all of TS is transpiled out, so you still have to do error handling, it seems to convince a lot of developers that it turns JS into a static type language, once again it all gets stripped out so it doesn't, and it loosely helps with documentation. other than from backenders who are working on the front-end where it superficially looks like code they are more familiar with, I don't see the appeal. I have a linter, unit tests, and documentation, what do I need TS to pretend to do?
  • All runs in VM these days?!
    • I've pushed for Winforms development (with Linq and EF), it is fast to develop, perfect for corporate admin apps.

      And then serve it up virtually.

      We have developers that are stuck in the AS400 world that could pick up Winforms pretty easily (as opposed to a very heavy full stack web UI - no CSS, no "why on Earth is that Angular control not acting correctly!?!!?", complicated callback structures, and frankly, poorer performance than a virtualized "local" implementation).

      Shoot use WPF if you want (which really

  • by RickyRay ( 73033 ) * on Thursday December 03, 2020 @01:31PM (#60790634)

    It's really sad that none of the languages in the list, with the exception of Python, are really any good (people forget that Python code can be fast, so, yes, it's good enough).

    I've used JS since the 90s. Server-side JS in the late 90s (Netscape server engine) was a simple, properly typed, compiled language. TypeScript, the less evil version of JS, tries in vain to handle the fact that modern JS is instead a convoluted step backwards from that. If Angular and React weren't using JS, JS and TypeScript wouldn't even be on this list.

    I've also used Java since the 90s (I started with Java 0.9). Java's many new extensions are typically mediocre imitations of other languages, and they have made it overly complicated both for dev and maintenance, unlike when it used to be a good language for even beginning programmers, and very easy to maintain. C# is just more of the same.

    Rust is so much better than C for the same low-level coding that it's embarrassing that C even exists for anything besides legacy code (speaking of which, it's time for a rewrite of Linux into Rust. Yeah, I said it).

    Ruby reminds me a lot of Python, so it's not so bad, but it's almost always used with Rails. I'll admit Rails is a quick way to prototype a site, but it's not appropriate for anything big. Instead, it makes more sense to use Python with Django or similar, which is just as easy to work with, without the scalability issues.

    Shell scripting has its place, but shell scripts are quite terrible, especially the Linux/UNIX/BSD ones, which are a mishmash of unrelated commands. There's actually a really good first step to solve that: somebody reimplemented bash as a modern real programming language, called "Crush". Data in Crush is passed around in fully typed streams, as the equivalent of rows in a DB or an array. Lots of cool features. Since it looks like Bash, it probably can be easily substituted for many shell scripts, adding dramatic improvements:
        https://github.com/liljencrant... [github.com]

    Facebook spent a fortune on PHP, and it's still so-so. The changes being made to it are a bit like putting a better engine and wheels on a model T. There are far better options:


    •    
    • Swift, when combined with SwiftUI, is really powerful. But it's still Apple-only (there's no Android or other version of SwiftUI), so it's not practical.
    •    

    • Flutter/Dart is really powerful, avoiding the complications faced by React and Angular coders with JS, and it is portable, it but doesn't match the level of SwiftUI.
    •    

    • Kotlin is distinct in that it handles both front end and back end scenarios well, and has many targets. If an equivalent of SwiftUI was created that works with Kotlin ("KotlinUI" ?), many issues would be solved. If an equivalent of WordPress was then created over that combination, creating templates for powerful websites, it could become the go-to solution.
    • C runs on everything, if you wanted to run Rust on something then you implement C, then use the C version of the compiler of your choice

      Plus C can run on everything including the kind of machine Rust would take one look at and give up due to lack of resources

    • "fast" means good to you? Good to me means "gets the job done and is easy to maintain." If a program has to sit around waiting for the user , a database or middleware most of the time it doesn't matter if it's not "fast."

    • I started using Python over anything else. I stopped using PowerShell (on Windows) and went to Python because it kicks the shit out of PowerShell in speed. And... I can use the same Python code (for the most part) on Linux. And Windows updates don't fucking break my code like happens many times with PowerShell.
  • by crunchy_one ( 1047426 ) on Thursday December 03, 2020 @01:31PM (#60790638)

    Not having come up in the wonderful world of web programming, I'd been blissfully ignorant of Typescript, and only passingly familiar with Javascript (aka ECMA script). Bliss, like much else on this plane of existence, is there to be worn away, and wear away it did when I decided to write an editor extension for Microsoft's VS Code. What I needed was a custom editor for files containing historically interesting stuff, like Hollerith cards and 7-track magnetic tape. More than just a standalone editor app, I wanted something along the lines of an IDE. My choices boiled down to Qt Creator, VS Code, and Sublime.

    Sublime was out right away because of its proprietary code base and its lack of sufficient interface surface to support a custom editor. Qt Creator could potentially do the job, but after spending too much time with the source code and its poorly documented plugin interface, I decided to cut my losses and give it up. That left VS Code.

    Working through the VS Code extension examples, the way forward was clear, albeit a bit weird. VS Code has the Chromium web engine at its core. If you're writing an extension like mine you're going to create gobs of HTML and CSS for your presentation layer, extended with generous wedges of Typescript to give the whole some degree of functionality. In brief, your extension becomes a web application.

    Here's the rub, Typescript is actually a pre-processor that converts an amorphous mess of Typescript into an equally amorphous mess of Javascript. Typescript is one of those languages that defies convention in ways that must appeal to someone, but not to me. For starters, there's no real language specification. Instead, Typescript du jour is described by a wiki maintained by Microsoft. Instead of any sort of standard library, a veritable zoo of NPM modules get glomed into your project, all with varying degrees of provenance and stability. You are left with all of the shortcomings of Javascript, one my least favorites being a complete lack of support for integer types.

    To get something to work at all, it is necessary to make constant reference to online resources. This could very well be a reason why Typescript scores so well.

    To summarize, Javascript is a turd that Typescript attempts to polish. Microsoft's VS Code is impressive in that it works at all, but in my opinion is taking itself and everyone who touches it down the road to fail.

    • I don't disagree with anything you said but the reality is that so much of the world runs on the web now that many of us are forced to use JavaScript at least a little. And if I have to handle a turd I would prefer a polished turd because it leaves less of a mess on my hands.
    • Just curious: why didn't you look to Intellij IDEA Community Edition? Open source, has many plugins, you can write them in Java or Kotlin. Even Google uses it for its own IDE (Android Studio).

  • It's a transpiled language (a meta language). Typescript transpiles to Javascript. Javascript is a scripting language and therefore also not a programming language. Javascript is processed by a Javascript interpreter that is hopefully written in an actual programming language that compiled to bytecode to be executed by the OS (for system calls) and hardware (CPUs, GPUs, network interfaces, and the like).

    When a new language comes out, there are a zillion people who hop onto that bandwagon as they rewrite

    • Why exactly do you think that scripting languages are not programming languages? Do you not program a set of instructions for a computer to produce a set of outputs? Scripting languages are a subset of programming languages not a completely different thing. JavaScript being not good doesn't preclude it from being a programming language. If I wrote an x86 compiler (and I'd be surprised if someone, somewhere hasn't done this) would it magically become and "actual programming language" to you?
      • by Tablizer ( 95088 )

        "Scripting language" used to mean a relatively simple and lightweight language for ad-hoc automation and gluing different subsystems together. JavaScript may have started out that way, but it's since grown into something used for larger purposes, for good or bad. It's a dynamic language on par with other dynamic languages, such as Python.

        • Being typically or historically used for different tasks doesn't make them not programming languages. They do the exact same thing just in different ways. Is Python not a programming language? What about C# and Java? They are used to program; they are Turing complete. They could be compiled down to any instruction set you want so what makes them "not programming languages"?
          • I define programming as "telling the computer what to do". In some cases this is done by flipping switches, for example.

            It seems like those who insist on separating scripting languages from other programming languages, are the same who foam about Wine not being an emulator. When they explain why Dosbox is an emulator but Wine is not, I just see a matter of degree. Both are using layers of abstraction to make a non-native program run on the host OS.

            With the Tiny C Compiler [wikipedia.org], you can write scripts in C as

            • by Tablizer ( 95088 )

              There are often debates about whether HTML and SQL are "programming languages" because they are not Turing Complete (TC). (Some dialects of SQL are.)

              I'm not sure that should be a requirement, for they can still do useful work without being TC, and require programmers to decide how to turn ideas into code in them. Sub-systems often don't need TC to do their part. Ultimately most non-trivial systems need a TC coordinator module, but sub-tasks are farmed out to non-TC components. However, such components are

    • You've obviously never looked at the internals of a modern Javascript implementation like V8. Also, by your logic, the C language implementation called Clang is a meta language (whatever that is). Most ignorant post ever.

    • You need to seriously refine your understanding of what a programming language is.

      Scripting languages are not programming languages? Interpreted languages are not programming languages? An 'actual' programming language must be compiled to bytecode to be executed by the OS?

      Where should we start with all this misunderstanding?!

  • ... is fine.
  • by cjonslashdot ( 904508 ) on Thursday December 03, 2020 @04:55PM (#60791476)
    McDonalds is popular. So is Budweiser beer.
  • A language being more used in Github projects does not make it more popular. Typescript, for example, is pushed more by managers as a means of keeping people's code under control.. That's pretty much all Typescript is for.

    There are two major coding philosophies: one of freedom and one of constraints. Constraints require less management but also cut down on productivity and, in the end, render increased software complexity.. Freedom enables happier developers, increased productivity, but requires active

    • is pushed more by managers as a means of keeping people's code under control

      And why is that? They wouldn't care if it was written in TrollTalk if the product ships. They care because of other developers having to deal with someone else's javascript messes. What is it the manager should do, write a elaborate coding standard that developers would have to learn? Personally I hate having to learn ANYTHING that wont transfer to a different job. Or they could just use TypeScript.

Dinosaurs aren't extinct. They've just learned to hide in the trees.

Working...