Tuesday April 12th, 2022 NCLUG Meeting

Stephen Warren swarren at wwwdotorg.org
Wed Apr 13 10:15:02 MDT 2022


On 4/12/22 19:52, Bob Proulx wrote:
...
> Stephen talked about a different templating engine.  A program he has
> been working on.  Stephen's Templating Engine!  He has written his own
> and gave a demonstration of how it was working.  This was also in
> Python.  Which has an advantage that python has self reflection so can
> reach into the data structures of the template engine and use it to
> advantage.  In this case he is writing a C/C++ code generator.  Or
> maybe more of a pre-processor.  To which I can't remember who famously
> said that it is more fun to write programs that write programs than
> just to write programs.

BTW, the concept was partially inspired by the following blog post re: 
how to implement a very minimal template engine:

https://bits.theoremone.co/how-to-write-a-template-library/

There's an existing implementation of something at least similar for C++:

https://github.com/blockspacer/CXTPL

However, ironically for something that's the embodiment of the concept 
of a minimal template engine, that repo has an extremely large number of 
dependencies, which put me off. And it's marked deprecated and the 
replacement is even more bloated. Hence, why I implemented my own, which 
was tiny!


More information about the NCLUG mailing list