You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the principles of PlatformScript is for there to be very little
magic, and what magic there is should be confined to limited
cases. This runs afoul of the "magical" values that are needed to make
things actually work. These are the "magical" values like React
constructors on the browser, or file system access on Unix systems.
It is anticipated that PS will run in many different contexts and so
we have to be able to swap out what is magically available without
that process seeming magical.
To do this, we make all magical values appear within a normal
module. Instead of them just appearing in your scope, they are
accessed by a special module called `--canon--`.
The "canon" can be passed into the module loader and any module that
requests the`--canon--` shall receive it. Eventually, we can use this
canonical value to typecheck code that accesses the canon.
The word canon was chosen because it refers to an established body of
work that can be drawn upon to perform contemporty tasks. Like the
canon of law, or the canon of prayer. Also because "env" was taken
already and we want to reserve "context" for a runtime api.
0 commit comments