Re: Variable ontology (was: Q: Pointers in TCl) _________________________________________________________________ From Andreas Kupries Organization Me, myself and I Date 03 Apr 1998 22:37:21 +0200 Newsgroups comp.lang.tcl Message-ID References 1 2 3 4 _________________________________________________________________ claird@Starbase.NeoSoft.COM (Cameron Laird) writes: > 2. Who uses subst? I just grilled Donal Fellows about > this, and the strongest proposition to which we > could jointly agree was that it's a lot like LISP's > macros. > > This is my position: every time I've used a subst, > I've ended up being happier with a different formu- > lation that didn't (confession: I'm eval-intoxicated). > I'm curious to learn whether anyone has a real > compelling instance of subst-ing. The two domains > that seem likely to me are some kind of CGI template > expansion, and processing of a configuration-speci- > fication-that-is-written-as-an-executable-script. If memory serves me well, Tcl-only HTML renderers use a combination of regexp and subst to convert the markup into commands, which then render the data into text widget. I use the same trick in my autodoc application to convert crossreferences like "bla bla ... .. tralala" into "bla bla ... [classRef FOO] .. tralala" which then produces the correct hyperlink in a 'subst'-run. -- Sincerely, Andreas Kupries -------------------------------------------------------------------------------