Re: reasons for learning typescript

JS syntax isn't that bad as long as you look at modern resources, e.g. const/let instead of var, arrow functions.  Rust and C++ are both debatably worse. I suspect you've just not had exposure to a lot of languages with more complicated syntaxes, but it is important to note that JS in the last 5-10 years is very different from JS prior to that and, in some ways, nicer than Python as a language.

The problem with JS is that it wasn't written with a coherent philosophy originally, and a lot of the code that gets popular is by newbies who put their neat package up and then a bunch of people end up using it because it's fast.  A lot of JS is by junior quality devs because of the culture of JS, namely really tiny packages with a few functions.  What happens in that sort of environment is that the inconsistencies build up and it becomes very valuable to have something checking your code.  In Python, people will generally name things the same, build larger packages with conventions, follow rthe leader when it comes to naming and style, and so on.  In JS, they don't.  You also don't have a good way to evaluate the quality of libraries either before using them.  The most reliable is download count, but a lot of the most popular JS packages are technically pre-1.0, and many of them don't even have complete documentation beyond throwing a few examples at you.  It's very wild west, but Typescript can check your code a lot of the time, the culture of Typescript gives you a sane subset of packages to stick to, and people put in the effort to type the most popular things as well.

As for why to learn JS?  Node, or web frontend.  I don't think Node is worth it for a whole host of reasons, but it pays super super well and there's a lot of resources out there on how to use it.  And for web frontend you haven't got other options.

@8
In theory everything you say is correct.  In practice, everything you say is correct if and only if everyone on the team and every library you use uses the TS typesystem correctly.  I have had to typecast with TypeORM, which is the flagship "you want a Typescript ORM library" far as I can tell.  I don't have that code in front of me; it's buried in a microservice from a few months back.  But I spent literally hours working around their misuses/overcomplicated typing problems and as far as I know that's the most mature ORM option.

As for Rust and Haskell, they don't have typecasting but they also don't have support for open unions/inheritance-like hierarchies unless you jump through hoops and anything even slightly outside of what the language is good at expressing is a complete pain.  Synthizer is C++ as opposed to rust for like 4 or 5 reasons, and being so much of a purist language that it can't represent inheritance and up/downcast is a big one.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : mechaSkyGuardian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ogomez92 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : mechaSkyGuardian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : mechaSkyGuardian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Turret via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : TJ . Breitenfeldt via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : TJ . Breitenfeldt via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector

Reply via email to