romshark / Go-1-2-Proposal---Immutability

A a Go 1/2 language feature proposal to immutability
https://github.com/golang/go/issues/27975
171 stars 4 forks source link

Investigate channel immutability #11

Closed romshark closed 6 years ago

romshark commented 6 years ago

Find out whether and how the const qualifier should affect channels.

romshark commented 6 years ago

const chan is semantically the same as const * Channel, it's an immutable reference to a mutable channel.

Therefore var ref const chan const Object describes the following constraints: