From: Joel de Guzman (joel_at_[hidden])
Date: 2003-10-24 21:21:39
David B. Held <dheld_at_[hidden]> wrote:
> "Joel de Guzman" <joel_at_[hidden]> wrote in message
>> Views *are* sequences. Conceptually a view has a begin
>> and end (typically, but not always, an iterator pair).
> Ok, thanks for the explanation. That makes things clearer
> (there really needs to be an MPL book, IMO, and probably
> a Fusion one when it gets done).
I'm sure you know that Dave and Aleksey are busy writing one ;)
I think there will be section on tuple algorithms. The concepts and
techniques are extensions of the metaprogramming techniques
set forth by MPL. In fact, it would have been next to impossible
to implement Fusion without a TMP library such as MPL.
>> Why is MPL being rewritten for tuples? It's like asking the
>> question why was STL rewritten for meta-sequences
>> (MPL)? Because these are two different domains. MPL
>> deals with metafunctions, Fusion deals with polymorphic
>> functions and metafunctions. MPL deals with types and
>> constants purely at compile time. Fusion deals with types
>> constants *and values* at compile time *and* at runtime.
> And this makes a lot of sense too. It's weird that there are
> three different domains, one of them halfway between the
> other two.
> I would say that a perfect language would let
> you collapse all three libraries together, since this is what
> I might call "abstraction-level redundancy".
Sounds like Haskell :-)
As an aside, you might be interested to know that Haskell might be
having its own meta-system. Haskell templates! See:
Unlike C++ meta-system, which is accidental in nature, the Haskell
guys got it right by having the same syntax for both TMP and runtime
Allow me to quote something amusing from the paper:
'''Robinsons provocative paper identifies C++ templates as a major,
albeit accidental, success of the C++ language design. Despite
the extremely baroque nature of template meta-programming,
templates are used in fascinating ways that extend beyond the
wildest dreams of the language designers. Perhaps surprisingly,
in view of the fact that templates are functional programs, functional
programmers have been slow to capitalize on C++s success;'''
Cross-fertilization, IMO :-)
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk