3 ms·
This is probably written by someone who works with C# much more than with Typescript. There's nothing here about narrowing, (proper) type inference, union and
by SebastianKra 2y ago
This is probably written by someone who works with C# much more than with Typescript.
There's nothing here about narrowing, (proper) type inference, union and intersection types etc...
When I tried C#, coming from Typescript, I was frequently hitting limitations that made sense from a historical perspective, but were killing elegant solutions.
For example, C# has null-safety, but it's different for Value-Types than for Reference-Types. So you can't have a generic function over Optional<T>.
Tbf, I was using Unity, which adds its own layer of insanity. And, as with any language, you eventually learn to work around the limitations. But presenting both languages as interchangeable is naive.
- neonsunset 2y agoUnity is stuck with an ancient version of the language and uses its own custom runtime which lacks access to most of the wider ecosysteTS has _too much_ “useless” type complexity which has no impact on code execution which is polar opposite to C#.