Disambiguating `META OF` and the META-XXX! (^) Types

An idea that emerged early on in Ren-C was that there was often a need to associate an object with another object (or action), to give more information about it.

You could do this with a global MAP!. But a built-in mechanism could be cheaper--and I foresaw the feature being foundational enough that efficiency would matter. This would likely be needed for every ACTION!, every ERROR!, every MODULE!, and many other places...

This mechanism was called the "meta" information of the object or action.

A New META in Town...

But now, the existence of the new ^word, ^pa/th, ^tu.p.le, ^(gr o up), ^[bl o ck] types give a category known as META-WORD!, META-PATH!, META-TUPLE!, etc.

I'm confident that calling that META is good. Given how foundational the technique is, I don't want to make understanding any harder by reusing the word for something completely unrelated.

It is likely that the lone word META will be a synonym for ^, for those who don't like symbols. Recall that it is lightly distinguished from QUOTE, e.g. that ^ null is null (not ') and it tolerates isotopes, returning the non-quoted BAD-WORD!:

>> ~asdf~
== ~asdf~  ; isotope

>> first [~asdf~]
== ~asdf~

>> meta ~asdf~
== ~asdf~

>> meta first [~asdf~]
== '~asdf~

>> meta null
; null

So what do we call the associated object?

  • auxiliary of ...

  • linked of ...

Bigger Question: Is One Linked Object Enough?

Over time I've come to wonder if keyed access is more important. For instance, in JavaScript you are able to assign arbitrary field members to a function:

> function foo() {console.log("foo.x is " + foo.x + " and foo.y is " + foo.y)}
> foo.x = 10
> foo.y = 20

> foo()
<- foo.x is 10 and foo.y is 20

Now that we can discern field access (foo.x) from refinement usage (foo/x), it makes it very tempting to follow suit and say that actions have arbitrary keyed fields like this. This could be where the help lives.

If this was the case, then there's no need for a "meta" object or naming it. You simply use dots.

This would require a re-imagining of how MODULE! works, but that's already happening in "Sea of Words". So it might mean that you can't link an arbitrary object to another object...you'd make maps...which is what every other language does instead of having a "secret" place to scribble on.

In any case, it is likely that the old sense of META is going away entirely (though the mechanic it relies on would be exposed another way). We'll see...

Internally in the macros I'm thinking of calling it something like AUX_OF() to replace macros like META_OF(). You run out of these words eventually. :frowning:

1 Like