Performance Implications of Antiform-FRAME!-is-Action

It ultimately turned out that this was a problem, and a problem that is resolved now...by pushing back to where NOTHING (antiform blank, e.g. ~ antiform) is the only stable form that requires you to use ^META conventions.

I followed through the implications of this, to really get all the ducks in a row.

The results are converging on something quite coherent and useful:

>> append/
== ~#[frame! "append" [series value part dup line]]]~  ; anti

>> words of append/
== [series value part dup line]

>> append.dup
== ~#[parameter! :[any-number? pair!]]~  ; anti

>> append.dup.text
== "Duplicates the append a specified number of times"

>> append.dup.optional  ; seems better than ".is-refinement"
== ~okay~  ; anti

>> append.dup.spec  ; would ".types" be better?  :-/
== [any-number? pair!]

Here we see the real power coming from the Ren-C concepts. We're exploiting the duality of FRAME! and action, where the antiform of a frame is the action. And then further, the idea that there's a separate dot operation for tuple picking...we can keep that meaning so that it still works on the antiform frame, to select out the antiform parameters.

And MAKE FRAME! goes back to unsetting slots:

>> make frame! append/
== #[frame! [
    series: ~
    value: ~
    part: ~
    dup: ~
    line: ~
]]

While COPY UNRUN can be used to get a FRAME! that lets you tinker with the interface:

>> copy unrun append/  ; UNRUN is just UNQUASI META for antiform frames
== #[frame! [
    series: ~#[parameter! [
        ~void~ any-series? port! map! object! module! bitset!]
    ]~
    value: ~#[parameter! [~void~ element? splice?]]~
    part: ~#[parameter! :[any-number? any-series? pair!]]~
    dup: ~#[parameter! :[any-number? pair!]]~
    line: ~#[parameter! :[]]~
]]

This stuff may look obvious or clear in retrospect (well it should look clear and obvious, though you'd probably have to use it to really have it sink in.) But it's quite hard to reason about and adjust in a system that has to keep running.

1 Like