
on Sat Sep 01 2007, Chris Lattner <clattner-AT-apple.com> wrote:
On Sep 1, 2007, at 2:14 PM, David Abrahams wrote:
on Sat Sep 01 2007, Chris Lattner <clattner-AT-apple.com> wrote:
Can you give me a specific example of where making the entire lexer a template would be more useful than adding a couple of virtual method calls? It isn't meaningful to lex anything other than a sequence of char's
You're serious? It's meaningless to lex UTF-32?
It's not meaningless, but templatizing the entire lexer (which includes the preprocessor) is not necessarily the best way to achieve this.
Granted. It was just the first example that popped into my head. My point was simply that, if you're interested in creating a flexible toolkit out of which people can build systems with the highest efficiency, static polymorphism in its interfaces is a virtual (no pun intended) necessity. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com