Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Parse refactoring puzzle

From: SunandaDH:aol at: 1-Aug-2003 2:55

Hi Joel:
> This sounds familiar, and I suggest that PARSE is overkill...
Thanks for the comments! We're getting into systems design philosophy here, but my particular issue is that I want clear-place-holders to be generic; and. in the application I'm designing, that seems the best approach: ** There are lots of different bits of code before clear-place-holders (each a different cgi program with a different html template). The _only_ reason each of them would need to present a complete list of place-holders would be if clear-place-holders wasn't generic. ** The html-template writer (a human at this stage) can add place-holders for items that are not supported or substituted by the code. (They might just be doodling, thinking, "would !!todays-date!! look good here, or here?" before telling me that we should support the !!todays-date!! place-holder). All I know is that as the last step before printing the HTML page, I want to remove any stray place-holders that are left. The parse solutions (mine and others') decouple the clear-place-holders function from anything above it....With the one proviso that it has to trust that higher code has substituted "!" for any "!" that the webpage user may have typed into a field -- just to make sure we don't do place-holder removal when someone's address really happens to be "!!my house!!". (Your solution has the same problem, though it's less likely to be triggered as the webpage user would have to type the text of an actual place-holder). Sunanda.