Re:How an Anti-TypeScript “JavaScript developer” like me bec...
by zaccusl on Tuesday March 02, 2021 @12:50PM
(#26318072)
TypeScript does have method overloading same as other typed languages (except you have to do runtime checks, but that is a JavaScript limitation).
Re:How an Anti-TypeScript “JavaScript developer” like me bec...
by munchbunny on Tuesday March 02, 2021 @01:45PM
(#26318803)
> except you have to do runtime checks, but that is a JavaScript limitation
IMO not having to do runtime checks is a big part of the value proposition of method overloading the way many languages do it. Whether or not it’s a limitation inherited from JavaScript, it’s still really klunky compared to other mainstream languages.
It’s one of the few things that I actually dislike about TypeScript, despite overall loving it.
If it's about optional parameter weirdness and TypeScript's lack of method overloading, I suspect that's inherited from JavaScript's laxness with method signatures. I don't like it either.