OK, I don't know the advertisement, but as far as my knowledge of english is
exploited, I would probably interpret it as a funny compliment.

What was I trying to underline was this:

f: func [] [print "Executed"]
(((:f)))

with any number of parentheses yields the same result. Another example:

do [do [:f]]

you can use any number of blocks here too...

But, consider this:

do head insert copy [] do [:f]

>> do head insert copy [] do [:f]
Executed

You get a different result, which looks slightly illogical to me.

Actually, to be precise, I have designed a different model of evaluation,
that behaves exactly as Rebol evaluation in a normal case does, but is free
of such (illogical?) effects. (To be exact: it is a model I thought Rebol
used until I found the difference described above...)

Ladislav

> Ladislav,  are you familiar with the old American (advertising)
> expression, "He's been eating his Wheaties!" ?
>
> [EMAIL PROTECTED] wrote:
> >
> > Problem:
> >
> > 1) When trying code:
> >
> > ((func [] [print "Executed"]))
> >
> > with the result:
> >
> > >> ((func [] [print "Executed"]))
> > >>
> >
> > One is immediately tempted to draw:
> >
> > (i) Rebol functions evaluate to themselves.
> >
> > What do you think about that?
> >
>
> Well, considering the following:
>
>     >> func [] [print "Executed"]
>     >> f: func [] [print "Executed"]
>     >> f
>     Executed
>     >> :f
>     >>
>     >> get 'f
>     >> type? get 'f
>     == function!
>     >> do 'f
>     Executed
>     >> do func [] [print "Also evaluated!"]
>     Also evaluated!
>
> I'd draw a slightly different conclusion:
>
>     Unevaluated REBOL functions (such as the result of evaluating
>     'func, or the result of 'get on a word which is bound to a
>     function) have no printable representation.
>
>     The effect of evaluating a REBOL function (as when evaluating
>     a word which is bound to a function, or when evaluating 'do
>     with a function value as its argument) depends on the content
>     of the function's body.
>
> Thoughts?
>
> -jn-
>
>
>

Reply via email to