4 ms·
Can you give some concrete examples of how C# is tedious compared to go? Things like var filtered = purchases.Where(x => x.Name.Contains("Sean")); and v
by Xeronate 6y ago
Can you give some concrete examples of how C# is tedious compared to go?
Things like
var filtered = purchases.Where(x => x.Name.Contains("Sean"));
and
var grouped = purchases.GroupBy(x => x.Buyer).Where(x => x.ToList().Count > 10).ToDictionary(x => x.Buyer, x => x.ToList());
etc. come up a lot in day to day programming and always feel tedious to me in go. The first example in go looks something like
filtered := []purchase{}
for i := range purchases {
if purchases[i].buyer == "Sean" {
filtered = append(filtered, purchases[i])
}
}
and it only gets worse as the domain gets more complicated. I don't really know what your background is where you feel that static typing and generics are complicated. I write C# every day and spend 0% of my time fighting the language.
- 0x445442 6y agoSame experience here for Java. I always have a hard time understanding the arguments against it. The platform and tooling far exceed that of Go and I've never found the writing of actual code to be anywhere near the bottle neck in the entire development process. And while I've never worked professionally with C#/.NET, I imagine it's a very similar experience.