[REBOL] Re: ROUND function (like TRUNC, FLOOR, etc...)
From: lmecir:mbox:vol:cz at: 23-Feb-2002 19:00
1) ask for the context of a specific word;
That would be useful, but mainly only if you were able to ask CONTEXT! what
other words it has, and things like these; i.e. only if it behaved like
OBJECT!. (Which is like asking RT to turn every CONTEXT! into an OBJECT! ---
pretty ironic conclusion for a thread that started with "'CONTEXT is a
confusing name for a function that makes OBJECT!s". :)
I am not missing such a function badly...
>2) use a context as the explicit second argument to BIND;
If you already have a word bound to it... (Well, that said, I'd like to have
BIND accept at least OBJECT!s, to avoid that extra IN, but even more to
accept functions etc. to avoid all the magic needed to get to it...)
Yes, I think, that there are no reasons why BIND shouldn't accept an object
or a function, or why IN shouldn't accept a function?
4) be able easily to ask whether two words belonged to the
I am quite satisfied with what I am able to do now.
>5) ask whether a specific word belonged to a specific context;
Not very important for me.
>and so on ... Making contexts first-class would be consistent with
>the REBOL approach that "everything is just a value" and would likely
>help de-mystify some of the more interesting things that REBOL can do
>that can't even be *said* in some other languages.
I agree here. (I second Ladislav in his desire to have all REBOL types as
What I really ask for is first class properties for all Rebol values (see
the example of ERROR! type values or UNSET! type value or circular blocks
regularly crashing the interpreter, etc.). I am not asking for a datatype
called CONTEXT!. (although some Rebol programmers might find that useful
>A nice notation for (1) would be
> context some-word
I'd say CONTEXT-OF, or GET/CONTEXT (this looks pretty consistent and clean
--- with GET you have the value, with GET/CONTEXT you have the context; you
could even replace BIND with SET/CONTEXT... :).
I admit, that It might be useful sometimes...