On Mon, Jan 2, 2023 at 7:20 PM Jon Bodner <
j...@bodnerfamily.com> wrote:
>
> I'm in the middle of updating Learning Go from O'Reilly (
https://learning.oreilly.com/library/view/learning-go/9781492077206/). The target release date is the end of this year and I wanted to make sure that I covered any language or library changes that can be expected through Go 1.22.
>
> I have already incorporated changes that are coming in 1.20, but didn't know which of the following I can expect in the next year or so:
It's a hard question to answer. Most of the things you mention are
proposals that haven't been accepted yet. I can say what I hope will
happen, but honestly most of these are undecided.
> - new for/range loop behavior
I hope this will get in, but I don't know whether it will.
> - structured logger in standard library
I hope this will get in, and I think it's fairly likely.
> - go.mod go declaration affecting compiler used on a per-module basis, possibly downloading new versions
I hope this will get in, but I don't know whether it will.
> - generics libraries moving from exp to standard library
I think this is moderately likely at least for slices and maps.
> - iterators
Really hard to say.
> - set type
Hard to say. There isn't even a solid proposal for this at the moment.
> - official arena allocator support
Doesn't seem very likely at this point.
> - only the struct literal with keys is legal outside of the package where a struct is declared
I think "go vet" already applies this rule. I have no idea whether it
will become part of the language proper.
> - official support for profiles driving compiler optimizations
I think this one is pretty likely to get in.
Of course I could be wrong about any of this. No promises.
Sorry that's probably not too helpful.
Ian