So this seems to tie into your other post about "Kinds" of Values
I've mentioned that we now have inert forms, and this is possible...and I think the idea seems sound.
>> @vid:[button "push me"]
== @vid:[button "push me"]
>> kind of @vid:[button "push me"]
== @vid ; or just vid ?
The name "KIND" was taken for a while to be the underlying type of an item regardless of quoting:
>> type of first ['''10]
== &[quoted]
>> kind of first ['''10]
== &[integer]
But I am now calling that "HEART". So KIND is available for this purpose now!
DO Could Have a Registry To Dispatch These
(I don't think we want to dispatch by binding, because things like vector
are too likely used by variable names.)
This is interesting in terms of the DO vs. EVAL distinction. DO would be able to handle this, but EVAL would expect a block of Rebol.
I like it. Also, the polymorphism of DO with things like different languages.
>> code: @javascript:-{function () { console.log "your JavaScript here" }}-
>> do code
; would be able to work in the Web Console
If you had your string in a variable, just JOIN it...
>> js-source: -{function () { console.log "your JavaScript here" }}-
>> do join @javascript: js-source
That's awesome. I look forward to wiping out CSS-DO and JS-DO, and letting DO be polymorphic!
Hopefully this will fulfill your wish!