Liam
Liam
There would be a flag in each package file to enable the `mut` qualifier. I haven't given it much thought, but maybe one of... ``` package main --immutable /* compiler...
All language changes are Go2 features, even if backward-compatible. If you're dependent on the Go team to implement this (vs providing patches yourself) it would come after error handling and...
A program with `package p --immutable` which needs stdlib functions that modify their arguments should call a mutable-aware shim package. Leave stdlib alone.
Go2 changes under discussion will break some Go1 programs by introducing new keywords. There will never be a GoX that breaks all programs.
>we have no other option but to allow casting immutable to mutable types ... See example code in https://github.com/romshark/Go-1-2-Proposal---Immutability/issues/23#issuecomment-427606414 New keywords are proposed for error handling; otherwise it's backwards compatible:...
It's up to the `//go:immutable` user to shim any unaware packages he needs. A stdlib shim would be provided. Shim authors only have to write those functions that need `mut`...
Flag in all files, yes. We need package and import stmts in all files; I don't think it's a burden. `//go:immutable` is probably best. I doubt the Go gods will...
Maybe the bytes package, or one of the container/* types?
You might want to @mention here those Go team members who posted in the golang/go issue, to request their input on this concept...
I've been planning to review this; sorry to see that your account has disappeared :(