Soft Quoted Branching: Light, Elegant, Fast

So-called "soft-quoted branching" now runs up against the question of quoting's meaning for binding.

Generally we would assume the example above would mean you would get an unbound block (or, more accurately, the block with the binding it has... which is usually nothing if it's source).

This means it's semantically different from:

if okay [[block as data]]

Because there, the block is evaluated... and under that evaluation, receives the current binding.

It would instead be the equivalent of:

if okay ['[block as data]]

We can now consider the potential meaning of:

if okay $[block as data]

This could be the real equivalent of if true [[block as data]].

$ forms aren't available for all types the way quoted forms are, but have the curiously appropriate property (in the current model) that they are available for all bindable types... so we can imagine the meaning of $ branches being "as is, bound".

1 Like