Bootstraps GitHub issue

vibecode
{"vibecode": {
    "doc": "bootstraps",
    "role": "conceptual framing for the 'bootstrap object' design pattern in Caspian — a one-off object built ad-hoc for a single specific situation, without the ceremony of declaring a class. The pattern is realized in code via the `bootstrap` keyword but exists conceptually independent of any specific syntax.",
    "status": "active brainstorming — concept settled, additional patterns and use cases still being explored",
    "audience": "Caspian programmers and designers",
    "builds_on": "https://puck.uno/documentation/requirements/caspian/classes/bootstrap-build"
}}

A bootstrap object is a design pattern: a one-off object built from nothing for a single specific situation. The developer doesn't want the ceremony of declaring a class — naming it, picking a place to put it, signaling that it's a shape others might reuse. They just want a thing that does what's needed here, right now.

The pattern is realized in code via the bootstrap keyword. But the concept stands on its own — a bootstrap object is whatever results from "start with a bare object, add methods and inheritance to its shadow, use it, move on."

Bootstraps are a natural consequence of Caspian's broader artifact-centric programming paradigm — laid out in the next section. In a language where objects are artifacts (concrete things in specific places) rather than instances of types, an object can exist without a type to admit it. Bootstraps are the syntactic convenience that makes "make an artifact directly, without first declaring a type" cheap and idiomatic.


Artifact-centric programming GitHub issue

vibecode
{"vibecode": {
    "section": "artifact_centric_programming",
    "role": "names the design philosophy that runs through Caspian's object model — objects are artifacts (concrete things that exist in specific places), not instances of types. Contrasts with traditional class-centric OOP and explains why several Caspian features point in the same direction: classes don't have intrinsic names, storage IS identity, functions are first-class values, and bootstrap objects can exist without a type at all.",
    "key_concepts": ["objects_are_artifacts_not_type_instances",
        "storage_is_identity",
        "classes_are_one_kind_of_artifact_not_the_foundational_one",
        "bootstraps_are_the_natural_consequence",
        "place_based_reasoning"]
}}

Caspian's object model is artifact-centric, not type-centric. This is a meaningful departure from the OOP tradition that Java, C#, Python, and similar languages share, and it's worth naming explicitly because several Caspian features that look unrelated are actually expressions of the same underlying choice.

Traditional class-centric OOP. The architecture IS the type vocabulary. Types come first; you design with them, name them, organize them into hierarchies. Objects exist as instances of types — a type is the gatekeeper of "what can exist." To create an object, you usually have to declare a type first; the type carries an intrinsic name (java.util.HashMap, collections.OrderedDict); the type-space lives separately from the value-space.

Caspian's artifact-centric stance. Types aren't the architecture; storage is. Every object is an artifact — a specific thing that exists at a specific place, that can be inspected, moved, replaced, passed around. A class is one kind of artifact (the puck.uno/class kind); a function is another kind; an instance built ad-hoc via bootstrap is yet another. They differ in role, not in fundamental kind. There's no separate "type space" the artifacts conform to — the artifacts themselves are the whole system.

This explains why a cluster of Caspian features that look independent are actually expressions of the same choice:

What the paradigm encourages. Once a developer internalizes the artifact-centric stance, code organization shifts:

Closest analogs in other systems:

This is a paradigm, not just a feature set. When evaluating whether a proposed Caspian feature is on-paradigm, the question to ask is: "does this treat objects as artifacts, or as instances of types?" Features that lean toward artifact-centric (more ways to use objects without committing to a type, more ways to compose artifacts, more emphasis on storage as identity) are aligned. Features that pull toward type-centric (mandatory type declarations, intrinsic class names, type-space separate from value-space) are off-paradigm and should be questioned.


What a bootstrap object is GitHub issue


When to reach for one GitHub issue

The canonical case: a developer is writing a custom script for one specific situation and doesn't want the baggage of class declaration. Examples of that shape:

What unites these: the object is one-of-a-kind by intent, not a candidate-for-reuse waiting to be extracted later.


When NOT to reach for one GitHub issue

The pattern's right when the object IS genuinely one-of-a-kind; wrong when it's secretly a class waiting to be extracted.

The boundary to draw: classes are for shapes worth sharing; bootstraps are for behavior worth doing once.


Examples GitHub issue

Each example lives in its own file. They share the same shape: a real-world-ish situation, the bootstrap code, and a brief "why a bootstrap" rationale (versus a plain function or a declared class).


Why Caspian fits this naturally GitHub issue

The deeper reason bootstraps are idiomatic in Caspian is that the language is artifact-centric, not type-centric. Objects exist as artifacts in their own right — concrete things in specific places — rather than as instances of types declared up front. A bootstrap object is just one more way to put an artifact in place, alongside class definitions, function values, Mikobase records, and worldlet entries. The pattern isn't an awkward workaround; it's the language working as designed.

Concretely, several features make the bootstrap pattern cheap and idiomatic at the syntactic level:

Other languages fight the pattern because they fight the underlying paradigm. Java requires every object to be an instance of a declared type — the artifact-first stance isn't expressible cleanly. Python supports building objects ad-hoc (object() then __class__.method = ...) but with awkward dunder mechanics that signal "you're going off the rails." In Caspian, ad-hoc object construction is on the rails — no special engine support is needed, just a syntactic convenience for doing it ergonomically.


Open GitHub issue

This file is brainstorming territory — the things below are unsettled.


© 2026 Puck.uno