r/ProgrammerHumor • • Mar 20 '24

Meme areJSDevsActuallySane

Post image
14k Upvotes

554 comments sorted by

View all comments

Show parent comment

3

u/al-mongus-bin-susar Mar 20 '24

Typescript is great but it gets cumbersome because it really puts an accent on the types more than every other language out there. You have to litter every file with dozens of imports for every type you use, which makes decoupling harder. You end up almost having to write your application code twice, once in type logic and once in actual logic. Once you start doing something with any meaningful degree of complexity the type mess that naturally arises is more silly than C++ templates.

6

u/jasie3k Mar 21 '24

I fail to understand how types by themselves force to write logic twice.

0

u/MeltedChocolate24 Mar 20 '24

That's very true. At least in my experience it makes using other packages waay easier compared to JS, and most of them are supported these days.

0

u/[deleted] Mar 21 '24

What? You have to import too many types? That’s what the types.d file is for my guy. Import all your types there and they’re in the global scope.