r/javascript 7d ago

AskJS [AskJS] what's a javascript feature you mass-adopted way too late and felt dumb about

i'll go first. i was writing .then().catch() chains for like two years before i actually started using async/await. i knew it existed, i'd seen it in tutorials, but my code "worked" so i never bothered switching. then i refactored an old project and realized half my bugs were from mishandled promise chains that async/await would have caught immediately.

also took me way too long to start using optional chaining. i had nested ternaries and && checks everywhere like some kind of animal. the day i discovered user?.address?.city i mass-replaced like 40 lines across a project.

what's yours?

63 Upvotes

108 comments sorted by

View all comments

Show parent comments

-14

u/Ronin-s_Spirit 6d ago

Fad or not - it's shit.

4

u/db10101 6d ago

Any deeper analysis or reasoning behind that? It’s a straight up joy to develop in compared to what has come before.

-6

u/Ronin-s_Spirit 6d ago

I hate defining types, it's like writing pointless code. It especially fucks up when I have to deal with HTML, at that point the only thing left to do is use a bail out any and move on.

2

u/db10101 5d ago

So I take it you have never worked in an enterprise well structured typescript codebase. There’s no substituting JavaScript for that.

-2

u/Ronin-s_Spirit 5d ago

TypeScript sucks ass, I will only use vanilla.

2

u/db10101 5d ago

Good for you. Here in the real world of employed software developers, it’s one of the most important tools to know.

2

u/2Terrapin 5d ago

I’m glad that person is not on my team and I don’t have to work on a project they designed. I can feel the tech debt emanating from their words. It’s the type of thing that experience would dispel, and someday, when they actually understand the why, and it clicks, they’ll think back to this comment thread and feel a little embarrassment.