An interesting issue came up--which I think gets at a sort of philosophical point about what Rebol is--and perhaps suggests something about terminology...
A big novelty in the fledgling "libRebol" API is its mixtures of UTF-8 strings with values/instructions, using only standard ANSI C. Up to this point it's been demo'd under the name rebDo()
. A simple example:
REBVAL *block = rebBlock("%foo.reb %bar.reb", "%baz.reb", END);
REBVAL *result = rebDo("first reverse", block, END);
(We see here variadic constructs, which treat the C string literals as LOAD-able data. So "first reverse"
is interpreted as two WORD!s...if you wanted a string you'd have to say "{first reverse}"
)
So...when you read this, what do you expect result
to be?
Don't scroll down and read more until you've thought about it. The point of me writing this is that I think it's a more profound question than it appears to be on the surface.
.
.
.
.
.
.
.
.
.
.
I'd been assuming the result would be the FILE! value %baz.reb. In other words, I was interpreting the intent as if rebDo(...)
was implicitly rebDo("[", ..., "]")
block: copy [%foo.reb %bar.reb %baz.reb] ;-- e.g. rebBlock()s are mutable
do [first reverse block]
The alternative interpretation would use the DO native to execute the file as a script. This would mean seeing the intent as:
block: copy [%foo.reb %bar.reb %baz.reb] ;-- e.g. rebBlock()s are mutable
do (first reverse block)
Looking at the other functions we're talking about exposing variadically, assuming a BLOCK! doesn't make a lot of sense. For instance:
if (rebNot("error?", value, END)) {...}
Because you wouldn't want that to act like:
if not [error? value] [...]
That would never run the code! It's much more likely you meant:
if not (error? value) [...]
So here's where we get into a terminology question:
"What do you call a rebXxx(...) where it acts like what DO would do with a block?"
There was a discussion at some point where Carl said he believed the evaluator's behavior was "The Rebol Language" itself--not "the DO Dialect of Rebol". And so that kind of gets into that point. DO isn't involved. The code is just getting...Reboled?
Because of the EVAL native, and its special purpose as the rebEval() "instruction", this can't/shouldn't be called "rebEval".
My leaning of the moment is to call this rebRun(). There's no meaning today for RUN "in the box", and although I've lobbied for the idea of making the most of short words, I've also suggested that maybe leaving a few to the users could be okay.
So here's where the terminology point comes up. You're not "DO-ing code"... DO is a command that, given certain parameterizations, Runs Rebol Code.
Pursuant to this--and in the interest of cutting down API entry points--I don't know if there really needs to be a rebDo(). rebRun("do", block, END); seems less ambiguous, having rebDo(block, END); seems to add chances for a misunderstanding. We'll see.