Date: Fri, 15 Nov 2024 02:23:45 +0200
Jens Maurer wrote:
> On 14/11/2024 16.48, Herb Sutter via SG7 wrote:
> > Steve, I agree, but there’s a distinction some of us are making between (A)
> reflecting the metadata and (B) generating code to access data. I strongly
> agree (B) would break encapsulation and therefore should respect access and
> all other language rules by default (and I say so in P3437). My view has been
> that we should restrict (B) by default directly, not restrict (A) because it
> happens to indirectly make (B) harder as a side effect.
>
> There are no provisions in the reflection paper to apply access checks at point
> (B). It might be fairly hard to do so.
See P3451.
> On 14/11/2024 16.48, Herb Sutter via SG7 wrote:
> > Steve, I agree, but there’s a distinction some of us are making between (A)
> reflecting the metadata and (B) generating code to access data. I strongly
> agree (B) would break encapsulation and therefore should respect access and
> all other language rules by default (and I say so in P3437). My view has been
> that we should restrict (B) by default directly, not restrict (A) because it
> happens to indirectly make (B) harder as a side effect.
>
> There are no provisions in the reflection paper to apply access checks at point
> (B). It might be fairly hard to do so.
See P3451.
Received on 2024-11-15 00:23:51