this post was submitted on 06 Aug 2023
2 points (66.7% liked)

TypeScript

834 readers
1 users here now

founded 1 year ago
MODERATORS
 

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.

top 3 comments
sorted by: hot top controversial new old
[–] aloso@programming.dev 4 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] HKayn@dormi.zone 1 points 1 year ago* (last edited 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.

[–] cerement@slrpnk.net 2 points 1 year ago

by those same criteria, the perfect programming language was created 4 years earlier – was PL/1 any improvement over LISP?