4 ms·
It's surprising that Go didn't ship with it, but given that they just added iterators, it's coming. Rust has combinators, which is the same thing. Most new la
by John23832 2y ago
It's surprising that Go didn't ship with it, but given that they just added iterators, it's coming.
Rust has combinators, which is the same thing.
Most new languages are recognizing that functional support (even if they don't consider themselves FP languages) is necessary.
- rw_panic0_0 2y agonah it's not coming, functions like maps and filters won't come to go by design, iterators are not only about FP stuff
- pjmlp 2y agoGo culture is quite clearly against this kind of niceties.
- devjab 2y agoYou can do functionality similar to LINQ with chaining as long as you don’t need to call a method with a generic different from the one defined. If you do need that, you’re going to have to do it without chaining. You can still do something similar but it’ll be a lot less elegant than how C# does it. It’s part of the design philosophy of Go though. They don’t want any magic. It’s similar to why they enforce explicit error handling instead of allowing you to chose between explicit and implicit. They want you to write everything near where it happens and not rely on things you can’t see. It’s probably the primary reason that Go is either hated or loved. I think it’s philosophy is great, a lot of people don’t. I have written a lot of C# over the years, so I’m a little atypical in that regard, I think most C# developers think Go is fairly inferior and in many regards they are correct. Just not in the ones that matter (come at me!). To elaborate a little on that, Go protects developers from themselves. C# is awesome when it’s written by people who know how it works, when it’s not you’ll get LINQ that runs in memory when it really shouldn’t and so on.