Closed
Description
From my understanding, the story of a private structure that is returned from a public api is a little hazy today. For example, what's the reasonable thing to do in these situations:
- Can I call a method on a private struct?
- Can I access fields of a private struct?
- Can I return a private struct?
- Can I reference a public type through which I can reach a private struct?
- Can I reference a private type which I receive through a public method in a type signature?
Questions 1-4 are answered with 'yes' today, but the answer to question 5 is no. I believe that these should either all be no, or all be yes. In my opinion, it's just too painful for them to all be 'no', and it's unclear to me whether there's benefit to that.
Nominating, we need to decide this.