ProtoScript2: A Static Prototype-Based Language

Introduction
Modern programming languages increasingly accumulate abstraction layers by inertia rather than by necessity. Classes, inheritance hierarchies, interfaces, traits, annotations, reflection, and runtime indirection are often presented as signs of maturity, while in practice they obscure control flow, complicate compilation, and weaken semantic clarity.
In many ecosystems, object-oriented programming has drifted away from explicit structure toward implicit behavior. Code becomes harder to reason about not because problems are complex, but because the language model itself encourages hidden coupling, late binding, and conceptual shortcuts. The cost is paid in predictability, performance, and long-term maintainability.
ProtoScript V2 is a deliberate reaction to this trajectory. It does not attempt to be feature-complete, fashionable, or universally applicable. Instead, it asks a narrower and more demanding question: what remains if we remove everything that is implicit, dynamic, or ambiguous from the object model—and keep only what can be fully understood, verified, and compiled?
Against Accidental Complexity
Much of the complexity found in modern programming languages is not essential to the problems they solve. It is accidental complexity: complexity introduced by the language itself rather than demanded by the domain. Layers of abstraction accumulate over time, often to accommodate edge cases, legacy patterns, or tooling expectations rather than conceptual necessity.
In object-oriented systems, this complexity frequently manifests as deep inheritance hierarchies, implicit dispatch rules, fragile override semantics, and runtime mechanisms that obscure what code actually does. Developers learn to navigate these systems defensively, relying on conventions, documentation, and discipline to compensate for models that are no longer self-explanatory.
ProtoScript V2 treats accidental complexity as a design failure. Its object model is intentionally constrained: fewer concepts, fewer exceptions, fewer degrees of freedom. The goal is not minimalism for its own sake, but a language whose semantics remain transparent at every scale, from a single prototype to a complete program.
A Brief Lineage: From Self to Today
In 1987, the Self language demonstrated that object-oriented programming did not require classes. Objects could be cloned from other objects, and behavior could be delegated rather than inherited. This idea—prototype-based programming—was conceptually elegant and radically simple.
Later languages such as Io explored this idea further, embracing dynamic delegation and deep reflection. JavaScript popularized prototypes on a massive scale, but at the cost of historical ambiguity: classes reappeared as syntax, prototypes remained mutable, and object semantics became difficult to reason about precisely.
ProtoScript V2 returns to the original insight of Self, while deliberately rejecting the dynamic aspects that made those systems difficult to compile and reason about.
What ProtoScript V2 Is
ProtoScript V2 can be accurately described as a prototype-based static language with a fixed layout.
This definition is not marketing language; it is a precise technical statement.
In ProtoScript V2:
- There are no classes.
- Objects are created by cloning explicit prototypes.
- Prototype relationships are declared and fixed at compile time.
- Fields and methods are resolved statically.
- Object layouts are deterministic and known in advance.
A prototype is not an abstract type. It is a concrete object definition that acts as a structural and behavioral template.
Static Delegation Instead of Dynamic Inheritance
Most prototype-based languages rely on dynamic delegation: method lookup walks a mutable chain of prototypes at runtime.
ProtoScript V2 makes a different choice.
Delegation exists, but it is static.
Prototype relationships are resolved at compile time. There is no dynamic mutation of prototype chains, no late-bound method lookup, and no runtime structural changes.
The result is a model that retains the conceptual clarity of prototypes while offering the predictability normally associated with static languages.
No Classes, No Magic
ProtoScript V2 explicitly excludes several features commonly considered “standard” in object-oriented languages:
- No classes or class hierarchies
- No interfaces or traits
- No runtime type introspection
- No dynamic casts
- No implicit
supercalls
These exclusions are intentional. Each one removes a source of implicit behavior, hidden coupling, or semantic ambiguity.
If a method is available, it is known. If a field exists, it is part of the object’s fixed layout. Nothing appears or disappears at runtime.
Override Without Ambiguity
Method overriding in ProtoScript V2 is strictly regulated.
An override must preserve:
- the method name
- the parameter list
- the return type
There is no overloading and no ad-hoc polymorphism.
This rule enforces true substitutability and prevents the gradual semantic drift often seen in large inheritance hierarchies.
Designed for Compilation
ProtoScript V2 is not an experimental runtime language. It is designed to compile.
Its object model enables:
- deterministic memory layouts
- direct mapping to C structures
- static resolution of method calls
- elimination of dynamic dispatch tables
The prototype-based model is not a performance liability here; it is a compilation advantage.
Why Another Language?
ProtoScript V2 is not an attempt to compete with general-purpose scripting languages, nor to replace existing ecosystems.
It is an exploration of a design space that has been largely abandoned: prototype-based programming without runtime dynamism.
For developers interested in language design, compiler construction, or alternative object models, ProtoScript V2 offers a coherent, historically grounded, and technically disciplined approach.
Conclusion
ProtoScript V2 revisits an old idea with modern constraints in mind.
By combining prototype-based object modeling with static resolution and fixed layouts, it demonstrates that simplicity and rigor are not opposed—but mutually reinforcing.
This project is an invitation to rethink what object-oriented programming can be when every mechanism is explicit, and every abstraction earns its place.
ProtoScript V2 is not about adding power to the programmer; it is about removing excuses from the language.
Alexandre Vialle
ProtoScript V2 is currently under active development. Documentation, specifications, and source code is published on GitHub github.com/ppyne/ProtoScript2.