3 ms·
How are collections in C# worse than in Go? In C# you have LINQ, in Go you're writing for loops around array slices.
by fabian2k 4y ago
How are collections in C# worse than in Go? In C# you have LINQ, in Go you're writing for loops around array slices.
- metadat 4y agoMaybe 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.
- efdee 4y agoWhich APIs were those?
- fuy 4y agoYou 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.
- UK-Al05 4y agoC# has very comprehensive collection API. More so than those languages. Most languages copy c#
- magicalhippo 4y agoWhich 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.collections.generic?view=net-6.0 https://docs.microsoft.com/en-us/dotnet/api/system.collectio... [2]: https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1?view=net-6.0#extension-methods https://docs.microsoft.com/en-us/dotnet/api/system.collectio...