Hacker News new | ask | show | jobs
by monadmoproblems 1590 days ago
I've long wanted a more succinct way of writing implicitly typed arrays. Whenever you work with data directly in the code, for example when hacking on leetcode, you end you with lots of horrible nested arrays:

new [] {new [] {1, 2}, new [] {3, 4}};

Something like:

@[ @[1, 2], @[3, 4] ]

1 comments

Hi there! I'm one of the C# language designers. I'm working on a proposal for that right now: https://github.com/dotnet/csharplang/issues/5354

Thanks!

You absolute hero!