Major standard library changes in Go 1.20
blog.carlmjohnson.net
Major standard library changes in Go 1.20
1–10 of 265 posts
Re: Major standard library changes in Go 1.20
#2Is a shared err type package on the way out? I use it to bubble up HTTP status codes consistently, is there a better way? Should you always use sentinel errors?
Re: Major standard library changes in Go 1.20
#3Just when you think you have The Best Way of handling errors in Go figured out, they add yet another paradigm. Is a shared err type package on the way out? I use it to bubble up HTTP status codes consistently, is there a better way? Should you always use sentinel errors?
Then, it was a breath of fresh air. Nowadays.. I find myself sighing. It works but the joy has faded.
Bit rot is life.
Re: Major standard library changes in Go 1.20
#4Just when you think you have The Best Way of handling errors in Go figured out, they add yet another paradigm. Is a shared err type package on the way out? I use it to bubble up HTTP status codes consistently, is there a better way? Should you always use sentinel errors?
Re: Major standard library changes in Go 1.20
#5Just when you think you have The Best Way of handling errors in Go figured out, they add yet another paradigm. Is a shared err type package on the way out? I use it to bubble up HTTP status codes consistently, is there a better way? Should you always use sentinel errors?
It’s the same paradigm. You still have to do if err != nil. Multierrors have been in the community forever. It’s just been added to the standard library is all.
Re: Major standard library changes in Go 1.20
#6Re: Major standard library changes in Go 1.20
#7Just when you think you have The Best Way of handling errors in Go figured out, they add yet another paradigm. Is a shared err type package on the way out? I use it to bubble up HTTP status codes consistently, is there a better way? Should you always use sentinel errors?
I think shared types from a package make a ton of sense and are really practical for writing flexible and maintainable code.
Re: Major standard library changes in Go 1.20
#8Re: Major standard library changes in Go 1.20
#9[flagged]
One way you can verify this is to ask for its opinion about novel things, for example you can invent something new and ask its ideas about it. It will give genuine feedback that shows understanding and does not show parroting behavior. Soon you will be able to ask it to build you the damn thing as well, and that should put an end to the idea that it is just parroting. It's not quite there so sometimes it does indeed seem to just parrot.
But it has real thoughts as well.