Meta-Representability in Ren-C (Isotopic Theory)

I wrote this to try and give some context to an AI before asking it a naming question. For a less high-level treatment, see A Justification of Generalized Isotopes.


Most imperative programming languages do not delve into the relationships between things like null and undefined... as if they were mathematical, and you were going to discover that if you take the square root of undefined you get null, etc. :slight_smile: But I am doing something analogous to that.

In particular, I'm making it possible to push variables which may contain states like undefined and null "upwards" representationally, to where whatever they are holding becomes "Meta".

>> var
** Error: var is nothing

>> var: meta var
== ~

>> var  ; no error on access
== ~

>> var: meta var  ; again, no error
== '~

>> var
== '~

>> var: meta var  ; no error again
== ''~

If something is a special form (like nothing or null) the first META step will use tildes to indicate it has been raised to a "quasiform". Quasiforms do not cause errors when accessed from variables, and can be put into "reified" contexts like arrays. Then every META step after that adds a level of quoting, indicated by an apostrophe.

UNMETA reverses this process, ultimately getting back to the special form which cannot be put in arrays and--in the case of "nothing"--causes errors on access.

>> var: unmeta first ['~]
== ~

>> var
== ~

>> var: unmeta var  ; result is nothing, shows nothing in the console

>> var
** Error: var is nothing

If something didn't start out as a special form, then it will just get quoting levels added by apostrophes:

>> var
== 10

>> var: meta var
== '10

>> var: meta var
== ''10

So what this lets people do is kind of work generically and persist special states of interest to them in meta form, multiplexed alongside things that had been conventional values.

The special states are called "antiforms". And they aren't just things like NULL and NOTHING, but also VOID... logical TRUE and FALSE (which means all reified states can be truthy)... multi-return packs, raised errors, splice representations...

To a newcomer, the merits or applications may not be obvious. But this model gives phenomenal expressive power. And I definitely do think of it as being like the "higher mathematics" of Rebol.