Public, Private, Protected
Introduction
Prospectus Celestial provides three access modifiers — public, private, and protected — which control the visibility of tags, variables, and fragments across scene files and modules. These three words are not a programmer's invention. They are the three fundamental categories of access that every organized society has had to define: what belongs to everyone, what belongs to the individual, and what is shared within a trusted circle. Every legal system, every constitution, every family structure, every biological membrane in every living cell answers these three questions.
"The first act of every civilization is to draw the boundary between the public and the private. The second act is to negotiate the protected space between them."
The Three Modifiers
public @image id="sharedLogo" src="logo.png" { } // world can see this
private $internalTimer = 0.0 // only I can see this
protected @fragment id="baseUpdate" { } // my children can see this
// (no modifier) — defaults to private // hidden by default
public — The Commons and the Open City
The Roman concept of res publica — the "public thing" — is the foundation of Western political thought. The res publica includes everything that belongs to all citizens equally: roads, aqueducts, courts, legions, the grain dole. These are the public resources of the Roman scene: accessible by any citizen, maintained by the collective, usable without permission.
In computing, the open-source movement embodies the public modifier at civilizational scale. The Linux kernel (1991, Linus Torvalds), released under the GNU General Public License, is a public @fragment of operating system code — accessible by anyone, modifiable by anyone, shared with everyone. As of 2024, Linux runs approximately 96.4% of the world's top one million web servers, over 70% of all smartphones (via Android), and 100% of the world's top 500 supercomputers. The public modifier, applied to a 10,000-line operating system kernel, generated trillions of dollars of economic value.
private — The Inner Life and the Seal of Confession
Privacy is not a modern invention — it is as old as the concept of the self. Every religious tradition has a category of private communication sealed from external access: the Hindu concept of antaratman (the inner self), the Christian seal of confession (information told to a priest that cannot be disclosed under any circumstances), the Jewish concept of tzniut (privacy as a form of holiness). These are not merely social conventions — they are the assertion that some information must remain inaccessible to protect the integrity of the person who holds it.
In computing, the private modifier enforces encapsulation — the principle that an object's internal state should not be directly accessible from outside. This is the technical foundation of data integrity: if external code can directly modify a private variable, the object cannot guarantee that its state is valid. The same principle underlies bank secrecy, attorney-client privilege, and the right to remain silent.
Exact technology: The private key in public-key cryptography (RSA, 1977; elliptic curve, 1985) is the ultimate private variable: a number known only to its owner, which can decrypt anything encrypted with the corresponding public key. The security of HTTPS — which protects approximately 95% of web traffic as of 2024 — depends on private keys remaining private. One leaked private key compromises an entire identity.
protected — Kinship, Guild, and Inheritance
Between the fully public and the strictly private lies the protected — the sphere of the trusted circle. In pre-industrial Europe, this was the domain of the guild: trade secrets shared among master craftsmen and their apprentices, but not disclosed to outsiders. A guild's protected knowledge — the recipe for Damascus steel, the secret of Venetian glassblowing, the formula for Meissen porcelain — was accessible to members and their trained successors, but not to the general public.
In object-oriented programming, protected means accessible to the class and its subclasses (its "children" in the inheritance tree). This is the biological model of genetic inheritance: certain traits (protected members) are passed to offspring but not visible to unrelated organisms. The gene for blue eyes is a protected attribute — inherited by children, invisible to strangers.
| Civilizational Sphere | public | protected | private |
|---|---|---|---|
| Roman Republic | Res publica (roads, courts) | Collegium (guild, priestly college) | Res privata (household, person) |
| Medieval Europe | King's highway, market square | Guild secret, monastery enclosure | Confession, personal correspondence |
| Modern democracy | Public law, government records | Professional privilege (doctor, lawyer) | Private communication, personal data |
| Biology | Extracellular signaling | Intracellular proteins (inherited) | Nuclear DNA (innermost, most protected) |
| PCML | Cross-scene shareable elements | Inheritable scene fragments | Internal state (default) |
Political Philosophy and the Three Spheres
John Locke (1689) argued that government's legitimate role is to protect three things: life, liberty, and property. These correspond almost exactly to the three access modifiers: Life (the private inner existence, inaccessible to external interference), Liberty (the protected sphere of association — the family, the church, the guild), and Property (the public economic system of exchange, accessible to all under law).
Jürgen Habermas's The Structural Transformation of the Public Sphere (1962) argues that healthy democracy depends on a well-functioning public sphere — a space of open discourse accessible to all citizens equally. The decay of the public sphere (through privatization of public media, political polarization, or commercial capture of public debate) corresponds, in PCML terms, to marking too many elements private — withholding from the scene what should be available to all.
Legal Parallels: Privacy Law in the Real World
Modern privacy law is essentially a legal codification of the three access modifiers:
- GDPR (EU, 2018): Establishes that personal data is
privateby default. Processing requires explicit consent — equivalent to apublicdeclaration by the data subject. - HIPAA (US, 1996): Medical information is
protected— shareable within a trusted circle of healthcare providers, but not with employers or insurers without consent. - Freedom of Information Act (US, 1966): Government records are
publicby default — accessible to any citizen who requests them, unless specifically exempted.
Biology: The Cell Membrane as Access Modifier
The plasma membrane of a biological cell is the most sophisticated access modifier in the known universe. It enforces three tiers of access: private (the cell's internal state — cytoplasm, organelles, DNA — inaccessible without active transport), protected (cell-surface receptors that communicate with specific ligands — a selective handshake), and public (excreted molecules — hormones, neurotransmitters, antibodies — broadcast to the surrounding environment).
The nuclear envelope within the cell adds a second layer of private protection around the DNA — a private within a private. The DNA itself is accessible only through highly regulated transcription machinery. This is precisely the behavior of nested PCML private scopes: the inner scope cannot be accessed even by the outer private scope without an explicit mechanism.
The Default: Private
PCML's default — when no modifier is specified — is private. This is not an accident. The default of privacy over publicity reflects a fundamental design philosophy: exposure must be deliberate; enclosure is natural. A cell does not need to decide to contain its DNA — containment is the default state of matter. A person does not need to decide to have private thoughts — privacy is the default state of mind. Openness requires a declaration; closedness requires nothing.
This is the opposite of many legal defaults, where government information is public unless classified. PCML aligns with the biological and personal model: private by default, public by deliberate choice. The programmer must actively declare something public — a moment of intentional exposure, not an accidental leak.