Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tadfisher
on April 24, 2024
|
parent
|
context
|
favorite
| on:
TypeScript: Branded Types
That's a weird objection, because Typescript classes are literally Javascript classes[1].
[1]:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
afavour
on April 24, 2024
[–]
There was plenty of outrage when classes were added to JS. “JS uses prototypal inheritance, not OOP!”
krapp
on April 24, 2024
|
parent
[–]
I'm still a bit cranky about that, but because objects should be good enough for anyone. They aren't even really classes anyway.
Aeolun
on April 25, 2024
|
root
|
parent
[–]
If it walks like a duck, and quacks like a duck, for all intents and purposes, it is a duck.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...