5
xerxius
33d

TypeScript fucking sucks asshole and its the most hideous shit ever. It turns my simple function into some hyper complex ass-fuckery. it hurts my eyes just to look at. FUCK TYPE SAFETY !

I can't do shit with type-safety If I can't fucking read my own code. fuck TS. I am gonna stick with the clean syntax of modern JS. I would rather use a testing library and do a proper testing than half ass-ed type assurance of TS.

TS needs to burn in fire.

Comments
  • 0
  • 18
    If you can't even understand the types your own damn program is using how do you understand what your program is doing in the first place?
  • 1
    If TS is too hard for you, try flow instead
  • 9
    You do know types is optional?

    You can use all other feature if you like.

    On the other hand, if you have so much problems with the types your probably using them wrong.

    Except for some very special cases I never have types take up much screen real-estate.
  • 2
    I mean "Type"-script
  • 4
    If you're using TS you need to write type-safe code. If you try to do things the "JavaScript way" and just litter your code with type unions it's inevitably going to turn into a mess. If you're not using type unions a lot I can't see what would cause your code to be worse than type-unsafe code.
  • 3
    @neeno Aka. "if you don't want bad code, don't write bad code", which I fully agree with
  • 3
    @12bitfloat precisely.
  • 1
    I guess he tried to write a function with an object destructor.

    That syntax is evil in Typescript 😁
  • 1
    @ReverendLovejoy advanced type using omit and loops and recursive typing is also quite complex, but no one that dislikes ts will ever go into that depth :P
  • 7
    I very much like typescript and think it is very well build. Union types, optional chaining, templates,.. now I atleast can write js code and be sure my code does what i expect it to do, and if it doesn't it means I made a mistake and the compiler will tell me about it. When I just started programming I liked PHP because it was loosely typed and because I thought typehinting was useless.. now I favor very strict languages like rust because you have compiler insurance on top of your tests. Reality is I didn't like it because I didn't fully understand it. But now I do there is no going back.

    Another side effect btw is the fact that it forces you to write better code; code that won't do unexpected stuff and bite you in the ass down the road.
  • 3
    Ah! Looks like a brainfuck who doesn’t know how to configure typescript.

    Jokes on you, I don’t have to deal with runtime exceptions.
  • 2
    Also, wrong Tag for ranting.

    Those newcomers smh
  • 0
    The hate in the comments deserves its own rant
  • 1
  • 0
    @MediocreGuy You hate on static typing, people hate on you :P
  • 0
    @12bitfloat That was my thought too but it isn't about my code it's about 3rd party libraries types. It becomes a headache to find the type. Any suggestions?
  • 1
    @DocFlow What do you mean by "finding the type"? Finding the typings for a library or finding out what type a function returns?
    The first one is indeed a problem because most of the time the typings don't exist or are outdated.
    If it's the latter just use a good IDE like WebStorm
  • 1
    @12bitfloat I enjoy using vscode. The problem that I don't know how to get the types of arguments that a function accepts or the type of return ? I will try webstorm to see the difference.
  • 1
    @DocFlow The included typescript extension in VSCode is also pretty good. Have you set up a tsconfig?

    As shown in this article (https://code.visualstudio.com/docs/... ) getting it to work should be straight forward
  • 0
    @12bitfloat Yeah I have set up everything. I think with I would get better at interpreting the errors of ts.
    Thanks tho!
Add Comment