Loading ...
Sorry, an error occurred while loading the content.

1551Re: [Cheetahtemplate-discuss] #set global

Expand Messages
  • Tavis Rudd
    Oct 11, 2002
    • 0 Attachment
      Hi Mike,
      On October 7, 2002 03:54 pm, Mike Warren wrote:
      > I was half expecting #include to work like an #include does with the C
      > preprocessor (before reading the docs ;); would it make sense to add
      > sematics to do that? (That is, include the text and presume it to be
      > part of the ``current'' file?) Maybe ``#include cpp "filename.tmpl"''?

      That's actually something that I purposefully left out and have no intention
      of adding. I can't speak for C, but in languages like PHP and PSP heavy use
      of that style of include is one of the worst systems of spaghetti code.

      Cheetah's parsed #include's are a short-cut for the following semantics:
      import a template from a file, share a searchList with it, fill it, and
      include its output string. '#include raw' is a short-cut for the following
      semantics: open a file, read its contents into a string, include the string.

      I'm not totally happy with cheetah's parsed includes, but I've left them in
      because other people find them useful. I find Python's module and import
      semantics to be much cleaner and use them almost exclusively.


      This sf.net email is sponsored by:ThinkGeek
      Welcome to geek heaven.
      Cheetahtemplate-discuss mailing list
    • Show all 10 messages in this topic