2 ms·
And what prevents you using them this way in Go? Just make a package and export a constructor function that does the validation.
by foldr 5y ago
And what prevents you using them this way in Go? Just make a package and export a constructor function that does the validation.
- Tomis02 5y agoI think that was the author's point. You _can_ use them this way but it's a hassle and most people don't do it. The language itself doesn't protect you against zero-initialisation errors, even though it could.
- deleted 5y ago[deleted]