Why I think Typescript is A Good Thing, But mainly a complaint about the number of programming languages. Other than objects (which were not invented), I don’t think any of them are a marked improvement on PL/1.

  • Aloso@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Over the years people have developed an unbelievable number of coding languages. They all do pretty much the same job in pretty much the same way.

    That’s one way to say that you don’t know a lot about programming languages.

    Personally I have coded in Mercury Autocode, COBOL, FORTRAN, PL/1, LISP, Assembler, PERL, basic, C, C++ and JavaScript plus probably some others I have forgotten.

    Sadly, there’s no functional language in this list except LISP.

    JavaScript’s longevity is assured for one reason. Browsers only support JavaScript.

    Incorrect, browsers also support WebAssembly, which allows many languages (including C, C++, Rust, zig, Go, and many more) to run in the browser. And even without WebAssembly, languages can be transpiled to JavaScript, so you don’t need to code in JavaScript to run your code in the browser. Languages that can be transpiled to JavaScript include TypeScript, CoffeeScript, Reason, Elm, PureScript, Dart, Kotlin, Scala, Nim, …

    However JavaScript has a flaw.

    Not just one. Every programming language is flawed. Some languages have no type safety, some have no memory safety, some have no thread safety (or no multithreading to begin with), some are too slow for certain applications, some have an incomprehensible or verbose syntax, most support only one (sometimes two) paradigms (functional / imperative / object-oriented / logical), some have no proper module system, or no control over mutability, or visibility, or memory allocation, or side effects… some lack ergonomic error handling, or cooperative multitasking facilities such as coroutines, or generators, or macros, or reflexion…

    If you don’t appreciate the vast design space that is programming languages, of course you won’t understand why there are so many of them.

    • Kayn@dormi.zone
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Correct me if I’m wrong, but AFAIK you can’t run Webassembly without JavaScript, so you’ll always need at least a bit of JS.