|
|
|
|
|
by nequo
1084 days ago
|
|
> does operator overloading turn c++ and others into the weakly typed language? Polymorphism is not the same as implicit type conversion. For example, in Haskell, `*` is defined for both integers and doubles so 3 * 4 and 3.0 * 4.0 both work without type conversion. But JavaScript converts strings to numbers in "3" * "4". > does typescript-like type checking (which barks on 1+”1”) with “disallow emit on error” turn javascript into the strongly typed one? I think so. And this is not surprising. TypeScript is a different language from JavaScript (even if it’s a superset of it). |
|