Comment on Using the C preprocessor as an HTML templating engineComments−woodruffw2ySeems like a bad idea, given that the CPP and HTML have a fair number of overlapping tokens (e.g. `#` for both URL fragments and macro beginnings).Why not use SSI[1]? It's inspired by the CPP's syntax, but is supported directly by most HTTP servers (and is more powerful, to boot).[1]: https://en.wikipedia.org/wiki/Server_Side_Includes−tiagod2yWhy not use SSI[1]?Because hacking is fun, and it's still fun if it's a bad idea−beej712yThank you for saying this!−ksherlock2y# is only processed by cpp when it's the first non-whitespace character in a line so that shouldn't be an issue in the real world. But, yeah, SSI.−woodruffw2yTrue. Maybe < and > would have been better examples, although one could argue those are optional :-)−zzo38computer2yYes, although if you use #define or C comments or several other stuff then it can potentially cause a problem due to it is not a C syntax and is not expected.−Alifatisk2yCompletely forgot about SSI! What a cool feature
Comments
Seems like a bad idea, given that the CPP and HTML have a fair number of overlapping tokens (e.g. `#` for both URL fragments and macro beginnings).
Why not use SSI[1]? It's inspired by the CPP's syntax, but is supported directly by most HTTP servers (and is more powerful, to boot).
[1]: https://en.wikipedia.org/wiki/Server_Side_Includes
Because hacking is fun, and it's still fun if it's a bad idea
Thank you for saying this!
# is only processed by cpp when it's the first non-whitespace character in a line so that shouldn't be an issue in the real world. But, yeah, SSI.
True. Maybe < and > would have been better examples, although one could argue those are optional :-)
Yes, although if you use #define or C comments or several other stuff then it can potentially cause a problem due to it is not a C syntax and is not expected.
Completely forgot about SSI! What a cool feature