News for hackers. Stuff that matters.
Re:TypeScript is terrible for library developers by overgard on Tuesday August 23, 2022 @04:32PM (#32571079)
I don't think allowing users to call libraries in all manner of crazy ways is a good thing at all, and I don't think anyone would really be that put out by following a more pythonic approach of just allowing one way to do something.
Re:TypeScript is terrible for library developers by mmmpop on Tuesday August 23, 2022 @04:35PM (#32571121)
Yeah but you're writing libraries in Javascript, that ship has sailed already. You're gonna just need a bit fat switch statement to check your input types on every public function you ever write.
Re:TypeScript is terrible for library developers by overgard on Tuesday August 23, 2022 @04:38PM (#32571146)
It's never too late to stop making bad designs. I've written plenty of (internal) libraries and if someone asked me to put in a big fat switch statement I'd ask them why they need it.
Re:TypeScript is terrible for library developers by edgyquant on Tuesday August 23, 2022 @06:00PM (#32572152)
We’re talking about typescript here