Re:The Case for C# and .NET
by fabian2k on Monday July 25, 2022 @03:40AM
(#32221580)
How are collections in C# worse than in Go? In C# you have LINQ, in Go you're writing for loops around array slices.
[ Parent
| on HN ]
Maybe I was using it wrong? As I recall, "the usual" APIs present in most other OO languages were not available when I tried to help a friend with a project 3 montjs ago.
Re:The Case for C# and .NET
by magicalhippo on Monday July 25, 2022 @06:36AM
(#32222656)
Which collection APIs were you missing? Between the standard interfaces and their default implementations[1] and the extension methods to IEnumerable[2] you can do quite a lot in my experience.
[1]: https://docs.microsoft.com/en-us/dotnet/api/system.collectio...
[2]: https://docs.microsoft.com/en-us/dotnet/api/system.collectio...
You might've forgotten to reference LINQ and Collections.Generic in your project? Because C# definitely has good collection APIs that influenced many languages including Java Streams.
C# has very comprehensive collection API. More so than those languages.
Most languages copy c#