REBOL embedded $variables
[1/4] from: fsievert:uos at: 9-Dec-2002 19:55
> Those of you who are familiar with Unix shell scripts and languages like > Perl know the usefulness of being able to evaluate variables embedded in > arbitrary text. For example, you might write a line like: > > <A HREF="http://www.example.com/$page"> > > where the evaluation of $page is substituted. This is pretty common.
This would mean, REBOL has to look in all any-strings for "$" whenever they are evaluated? And it must be copied. Not good. You would have to add more evaluation-exceptions in your stack-machine. For example: url: "http://www.rebol.com/$url" == ... a: <a href="$url"> == <a href="http://www.rebol.com/$url"> a == <a href="http://www.rebol.com/http://www.rebol.com/$url"> ??? The url is evaluated a second time here Doing at load-time would be a bad idea, too.
[2/4] from: lmecir:mbox:vol:cz at: 10-Dec-2002 8:36
> Interesting, I must be getting a little better understanding of REBOL > because I got about twice as much out of that article as the last time I > read it. ;-) Great article Ladislav!
Thanks, I am honored.
> I do have to say this much though, as Carl mentioned, REBOL *does*
> it's current context, however strings do not know REBOL's current
context. That is not the exact citation, Carl said it right: "REBOL knows the context of words at execution time, but not the context of blocks, strings, parens, etc." This exactly says, that no "current context" exists, the only context information, that is available, is the context information "contained" in Rebol words. Any Rebol word has got its own information, though, so there is no way, how to meaningfully define the "current context". Hope this clears it a little bit. Regards -L
[3/4] from: ammon:addept:ws at: 10-Dec-2002 3:20
Hi, Once again my slowness to learn show up. ;-) Thanks for setting me straight there. Now I will reiderate what I experienced... A block and a paren don't actually know their context, but rather they can contain words and REBOL does know the context of all words, but because a string doesn't have the ability to contain words you see a different result from DOing a string than DOing a block, or paren. Did I get that right? Thanks!! Ammon Johnson --- CIO Addept ------------------ (www.addept.ws) 435-616-2322 -------- (ammon at addept.ws)
[4/4] from: lmecir::mbox::vol::cz at: 10-Dec-2002 12:32
> A block and a paren don't actually know their context, but rather they can > contain words and REBOL does know the context of all words, but because a > string doesn't have the ability to contain words you see a different
> from DOing a string than DOing a block, or paren. > > Did I get that right?