Go proposal: types that can only be created by defining package

proposal: Go 2: permit types to say they may only be created by containing package · Issue #43123 · golang/go.
It would be useful to permit types to say they may only be initialized by their defining package, for two reasons: types that have value-level invariants, e.g an ordered interval between two natura…

This thread was posted by one of our members via one of our news source trackers.

Corresponding tweet for this thread:

https://twitter.com/dev_talk/status/1351589753616019464

Share link for this tweet.


Related portal: