4 ms·
Runtime type systems: TS has none; C# has extensive RTTI Function dispatch: TS is purely dynamic; C# has both static and dynamic OOP: Mandatory in C#, optiona
by RyanCavanaugh 3y ago
Runtime type systems: TS has none; C# has extensive RTTI
Function dispatch: TS is purely dynamic; C# has both static and dynamic
OOP: Mandatory in C#, optional in TS
Variance: Implicit in TS, explicit in C#
Numeric types: TS has one (number); C# has the entire signed/unsigned/float x 8/16/32/64-bit matrix
There's really no intentional effort to converge them.
- dgellow 3y agoYour list of differences is correct but not really what I meant. The points you listed are mostly due to JS runtime constraints. The choice of nominative vs structural type system is purely a design choice by the typescript team.
- no_wizard 3y agoTS has two. number and bigint[0], corresponding to Number and BigInt in JS, respecitvely [0]: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#bigint https://www.typescriptlang.org/docs/handbook/2/everyday-type...