Looking for any discussions where you have strong opinions,because I probably do.
Mostly work in Golang nowadays, although have worked with Python and Javascript in the past.
Nice little collection you've got there. I agree that the casing issues should be fixed, although this shouldn't be a high priority since you can always set up your editor to auto-complete this stuff for you.
I'm meh about interface literals to be honest. Making the sorter a separate type makes it more re-usable in my opinion.
The collect statement is sort of try-catch again, isn't it? The problem with these kind of catch-all statements is that developers end up writing hundreds of lines of code in the block, and then you are left wondering about where exactly the error was encountered (especially when using error tracking software such as Rollbar or Sentry)
I really like the idea of interface literals, mainly for the reason that it groups code where it gets executed. It is nice to force re-usability though.
I agree with the critique on collect though, and I personally don't think it's going to go through. I know a lot of people are unhappy with Go's error handling for several reasons though, so I personally think it may be a step in the right direction, although I'm more of a fan of including github.com/pkg/errors into the standard library, which is a separate proposal. (I didn't include it in here since I believe it could instead just be added in Go 1)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice little collection you've got there. I agree that the casing issues should be fixed, although this shouldn't be a high priority since you can always set up your editor to auto-complete this stuff for you.
I'm
meh
about interface literals to be honest. Making the sorter a separate type makes it more re-usable in my opinion.The
collect
statement is sort oftry-catch
again, isn't it? The problem with these kind of catch-all statements is that developers end up writing hundreds of lines of code in the block, and then you are left wondering about where exactly the error was encountered (especially when using error tracking software such as Rollbar or Sentry)I really like the idea of interface literals, mainly for the reason that it groups code where it gets executed. It is nice to force re-usability though.
I agree with the critique on
collect
though, and I personally don't think it's going to go through. I know a lot of people are unhappy with Go's error handling for several reasons though, so I personally think it may be a step in the right direction, although I'm more of a fan of includinggithub.com/pkg/errors
into the standard library, which is a separate proposal. (I didn't include it in here since I believe it could instead just be added in Go 1)