Uses of FENCE! In Dialecting

I'm now committed to make braces a new array type. Rebol has put itself in a bad position by using that particularly valuable piece of keyboard real-estate for something "superficial" like making strings a little cleaner, sometimes. :-/

[block] (group) {fence}

It's likely (though not 100% set in stone) that FENCE! will evaluate by running MAKE OBJECT!. But what might it do in other dialects?

  • "If there's an integer inside of a pair of fences, such as {{10}}, then that represents a citation. Citations can appear at either the beginning or end of a reference block."

  • "In the PARSE dialect, blocks are used to represent subrules. Groups switch over to running ordinary code as with DO. While fences are used to... (insert your active imagination here)"

If FENCE! Were Inert, That Would Change Dialecting Possibilities

Fences don't necessarily have to produce an object under evaluation. If it wasn't, you could do things like pass it to an arity-1 MAKE:

>> obj: make {x: 10 y: 20}
== ...object x: 10 y: 20...  ; whatever literals look like

Switching to an arity-1 MAKE could be dialected, if you needed to slip things like a parent object in:

>> obj2: make {<parent> obj, x: 30}  ; potential dialect for mentioning parent
== ...object x: 30 y: 20....

>> obj3: make {{obj} x: 30}  ; weirder but more succinct dialect parent concept
== ...object x: 30 y: 20...

Less disruptive, we could just say it reduces:

>> reduce {x: 10 y: 20}
== make object! [x: 10 y: 20]  ; or whatever

Then GET-FENCE! could do the same:

>> :{x: 10 y: 20}
== make object! [x: 10 y: 20]  ; or whatever
1 Like