Facet 6 · Access Modifiers

Public, Private, Protected

The Architecture of Trust — three words that encode millennia of political philosophy, law, biology, and the organization of all human society
Facet 6Political PhilosophyLaw & Society

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
Accessible to all
Any scene, module, or component can read and reference this element. It is offered to the world without restriction.
private
Accessible only within
Only the enclosing @pcml block can access this element. Hidden from all external observers. The default when no modifier is specified.
protected
Accessible within kin
Accessible in this block and any derived or child scenes. Shared within a trusted lineage — not broadcast to strangers.
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.

Metaphor
"public @image id='sharedLogo' is the Eiffel Tower: anyone can see it, anyone can photograph it, anyone can use it as a landmark. It belongs to the scene. It costs nothing to access. It gains value from being seen."

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.

Metaphor
"private $internalTimer is the monk's cell: visible to no one, known only to the monk who lives there. The monastery may be public. The chapel may be protected. The cell is private — not because the monk has secrets, but because some things must have an inner life to function at all."

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 Spherepublicprotectedprivate
Roman RepublicRes publica (roads, courts)Collegium (guild, priestly college)Res privata (household, person)
Medieval EuropeKing's highway, market squareGuild secret, monastery enclosureConfession, personal correspondence
Modern democracyPublic law, government recordsProfessional privilege (doctor, lawyer)Private communication, personal data
BiologyExtracellular signalingIntracellular proteins (inherited)Nuclear DNA (innermost, most protected)
PCMLCross-scene shareable elementsInheritable scene fragmentsInternal 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:

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.

Metaphor
"Default private is the wisdom of the closed hand. You do not need to squeeze your fist to hold something — gravity does it for you. You must actively open your hand to give. PCML encodes the same wisdom: hold by default. Share deliberately."