Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-09-01 17:14:52


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?

> for example, and efficient buffer management (at least in our
> context) means that the input to the lexer isn't useful as an
> iterator interface.

Well, the kind of input sequence is exactly one thing I would
templatize.

> The point of most of the LLVM design decisions is not to hide from
> templates: it is to use the right C++ design features in the places
> where they make the most sense. C++ is a very rich language and
> offers a wide design space to choose from. Templates are one
> important piece of this design space, but C++ also offers many other
> great things.

Agreed.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk