[REBOL] Re: REBOL embedded $variables
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.