3 ms·
OK thanks for this, the easily mock thing is indeed very nice to have. And maybe Generics will improve things. I don't get why there isn't a function to remove
by weatherlite 4y ago
OK thanks for this, the easily mock thing is indeed very nice to have. And maybe Generics will improve things.
I don't get why there isn't a function to remove element from a slice (there's some append[:i],[i+1] trick instead) why wouldn't this be wrapped in a stdlib function? call it delete or something. I keep hearing good things about the stdlib - what am I missing?
It's that do it yourself mentality I really don't like, and taking huge compromises on readability to preserve low language keyword count (like the lack of private keyword / capitalization the article discussed and the consequences) and then calling this whole setup "simple".
There's nothing major but many many small things I think that make it a subpar experience. I don't care that much about performance and concurrency though which I think are Go's strong suits.
- alecthomas 4y agoA lot of these little irritations were due to a lack of user-accessible generics. Now that generics are available, they're available in the exp/slices package: https://pkg.go.dev/golang.org/x/exp@v0.0.0-20220609121020-a51bd0440498/slices https://pkg.go.dev/golang.org/x/exp@v0.0.0-20220609121020-a5...