11
Nils
1y

Typescript would be such a beautiful language if it wasn't for JS

Comments
  • 3
    True... at least there is Deno to get some alleviation
  • 3
    TS represents everything that's wrong with JS.

    TS chose JS as a language to improve. JS was already fucked, there's no saving it because everyone is using it for shit it's not designed for.

    Everything in JS is a hot patch or bandaid to make it not suck.
  • 5
    @sariel TS chose to improve JS because JS desperately needed improving and has no alternative
  • 1
    @Kernel probably because you don’t know any better? (I mean, there’s some good stuff when it comes to, say, Nest, but it’s still just a glitter coating on a steaming pile of poop)
  • 4
    @Kernel well I like TS what I do not like are the boundaries and restrictions it has from JS:

    1. No real runtime typesystem beyond natives
    1.2 everything that a runtime type model brings with it, which is a lot
    2. `this` is basically a bug 99% of the time
    3. Type concae(something) object + array = 0, array+object = {}
    4. The absolute abuse of npm (server-side vs client side deps)
    5. The tool chain = 0, there is a official API and a few implementations that's it every thing else is community crafted: vite webpack npm prettifier lining
    6. And the only problem that TS kinda fixes compile time typesavety
  • 1
    @12bitfloat js doesn't have an alternative because it's being used for shit it was never intended to be used for.

    JS is a perfect example of why you don't allow the extremely misguided and young developer have free will within your project.

    TS attempted to correct this and had so far failed to make it better.
  • 4
    @sariel JS has no alternative because browsers never implemented one

    On server side I totally agree with you, fuck Typescript. But on the frontend you're fucked either way. Might aswell use TS with better type saftey
  • 1
    @100110111 I do know better and have used multiple stacks and technologies professionally. I still like JS, definitely love TS and think these are good technologies.

    I have no one around me to get brownie points for hating on it or using something "better" btw, so that might be a good reason as to why i deviate from neckbeard trends of hating the tools and the shit that other people use. There ain't no such thing as a perfect programming language.

    Well, except for Rust of course.
  • 2
    @AleCx04 Rust simp is a winner in my book
  • 1
    @12bitfloat always a lot of good room to be simping about Rust
  • 0
    If you stick to functional paradigm, JS is ok. Once you start using class prototype chain, shit gets crazy really fast.
  • 2
    @Kernel @AleCx04 just for the record, I do actually quite like TS, to be honest. For prototyping. Basically every time I need to do a quick and ”dirty” backend proto, I default to Nest. When it comes to React (or Vue, or any other frontend framework I’ve tried along the years), I think it’s more about just disliking frontend development full stop.
  • 0
    I'm working on the programming language of my dreams, if that flops, I'll build something that

    - guarantees complete JS interop like Typescript
    - discards the absurd rule about not introducing syntax and pretending very hard to be JS despite not supporting several common JS patterns.
  • 0
    @100110111 100% can get behind that. I hate frontend development.
  • 0
    @lorentz kotlin can compile to JS I don't know how useful it is tho.
  • 0
    @12bitfloat why do you prefere js over TS on backend. I see nearly no drawbacks if any to choose TS over js
  • 2
    @Nils No I mean I would choose a better language than TS for the backend
  • 0
    @Nils The root problem with transpiling existing languages to JS is that unless your language replicates some very specific minor design errors your equivalent of objects won't support all usage patterns JS libraries offer, or the interface will be very slow (even compared to JS) and entirely explicit, so you won't get the kind of seamless interop Typescript supports by design.
Add Comment