youtube image
From YouTube: SES-mtg: Decorators and private state


Recorded at the "SES Strategy Meeting" on Jan 24, 2019. See

Bradley observed that a class decorator can obtain the source of the class, rewrite it, evaluate that, and replace the original class with the result. This means there's no loss of security providing a class decorator with access to the internal PrivateName.

However, the decorator can only do an indirect eval. It cannot access the lexical scope that the class appears in. Thus, a "private" declaration that appears outside the class remains protected.