News for hackers. Stuff that matters.
Re:TypeScript: Branded Types by tadfisher on Wednesday April 24, 2024 @05:56PM (#40150243)
That's a weird objection, because Typescript classes are literally Javascript classes[1].

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:TypeScript: Branded Types by afavour on Wednesday April 24, 2024 @07:06PM (#40150972)
There was plenty of outrage when classes were added to JS. “JS uses prototypal inheritance, not OOP!”
Re:TypeScript: Branded Types by krapp on Wednesday April 24, 2024 @07:09PM (#40151011)
I'm still a bit cranky about that, but because objects should be good enough for anyone. They aren't even really classes anyway.
Re:TypeScript: Branded Types by Aeolun on Wednesday April 24, 2024 @09:08PM (#40152011)
If it walks like a duck, and quacks like a duck, for all intents and purposes, it is a duck.