|
Boost : |
Subject: Re: [boost] traits classes vs. metafunctions
From: Dave Abrahams (dave_at_[hidden])
Date: 2013-03-31 18:45:45
on Sun Mar 31 2013, Jonathan Wakely <jwakely.boost-AT-kayari.org> wrote:
> On 31 March 2013 18:31, Stefan Strasser wrote:
>>
>> I don't understand why they didn't get rid of the "metafunction" concept as
>> we use it today entirely, but introduce it into the official standard via
>> type traits.
>> E.g. via a "constexpr" that can return types, or some other native syntax
>> for metafunctions.
>
> And I don't understand why people expect the standard to emerge
> perfectly formed from some magic source of an ideal language.
>
> This stuff doesn't just happen by magic, someone has to propose it and
> the people involved have limited time and resources.
>
> There are good reasons for the committee to standardise existing
> practice instead of trying to invent entirely new tools that noone has
> any experience with. The <type_traits> header we have today is
> largely based on ideas that got proposed because they were known to
> work and were useful in the real world. When <type_traits> was added
> to TR1 constexpr didn't exist. When constexpr was added there were no
> working implementations to experiment with.
And the specification wasâand probably still isâcorrespondingly broken.
That's what usually happens when you standardize something that isn't
implemented.
-- Dave Abrahams
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk