2 ms·
Start a petition for T#. Merge C# and TypeScript. I want my C# pattern matching in TypeScript and TypeScript's fluidity in C#. Simplified initialization in C
by CharlieDigital 4y ago
Start a petition for T#.
Merge C# and TypeScript.
I want my C# pattern matching in TypeScript and TypeScript's fluidity in C#.
Simplified initialization in C# without new(). Unless otherwise specified, use a default generic Dictionary<T,U> and infer the types for map initialization like:
var x = { ["a"] = 1 };
Instead of:
var x = new Dictionary<string,int> {...};
Then automatic type mapping and conversion utilities to objects:
record class Rec(string a, int val);
var k = x as (Rec)
(Yes, can already be done with implicit type conversion operators or writing utility classes, but making it more like TypeScript would just make it easier to adopt)