build-markup should have a name change
[1/4] from: brett:codeconscious at: 18-Sep-2002 17:39
Given build-markup is only in the betas (as far as I'm aware), I thought I'd
make a couple of criticisms it gets concreted into the released language
with that name.
This is no critisism of the actual code of build-markup because it does add
value.
However, I believe build-markup to be misnamed. It really only takes a
string! and emits a string!, and if you review it, it does not in any sense
process markup at all. It really is only a sophisticated string based
replace/all. For example:
>> build-markup {The time is now <%now/time%>}
== "The time is now 17:17:36"
Load/markup returns tags and strings - it at least ackowledges that markup
consists of tags and strings. The output of Build-markup cannot be passed to
load/markup in all cases.
In summary, nowhere in build-markup is there any meaningful reference to
markup. A build-markup function should take a dialect [block!] as input in
order to produce a string.
I'd like to see it change name.
Am I off track here?
Comments?
Brett
[2/4] from: al:bri:xtra at: 18-Sep-2002 21:31
Brett wrote:
> In summary, nowhere in build-markup is there any meaningful reference to
markup.
> I'd like to see it change name.
I'd suggest that the new name be:
RSP
which is short for "Rebol Server Page". Or perhaps:
Rebol-Server-Page
Why? Because the it's so similar to Active Server Pages, Java Server Pages
and Python Server Pages.
Andrew Martin
ICQ: 26227169 http://valley.150m.com/
[3/4] from: greggirwin:mindspring at: 18-Sep-2002 17:29
I agree Brett. Are there any other routines with similar functionality, or
is this an idiom that will be used other places that could use a good common
base name/word?
What about something like COMPOSE-TAGS?
Give it refinements to allow different tag markers and callback functions,
use Romano's parser from the recent macro thread, and call it EXPAND,
EXPAND-MACROS, or, as Romano did, COMPOSE-STRING.
--Gregg
[4/4] from: jason:cunliffe:verizon at: 18-Sep-2002 21:41
> What about something like COMPOSE-TAGS?
Much better. I like it
./Jason
Librarian comment