|
Boost : |
Subject: Re: [boost] [guidelines] why template errors suck
From: Eric Niebler (eric_at_[hidden])
Date: 2010-09-27 18:09:16
On 9/27/2010 5:06 PM, David Abrahams wrote:
> At Mon, 27 Sep 2010 15:57:49 -0400, Eric Niebler wrote:
>> I want to say that a SpiritParser is a SpiritNode<plus> OR a
>> SpiritNode<right_shift> OR a SpiritNode<terminal> (the plus and
>> right_shift concepts being recursively defined in terms of
>> SpiritParser,
>
> I showed you how to handle it above.
You showed me (in broken code according to Sebastian) how to define a
concept that, AFAICT, is useless.
> You're thinking about this the wrong way. Concepts are a rule-based
> system, and you're approaching them functionally. It's a totally
> different programming paradigm.
This doesn't help me understand it.
>> the terminal concept having little more than a
>> value_type typedef and a member), the intersection of all those
>> concepts would have exactly nothing. So I couldn't do anything with
>> it from a constrained context. What have I missed? How is the
>> SpiritParser concept you've defined above supposed to be used?
>
> Heck if I know; it's your library, man! It's empty because I don't
> know what operations your operator= needs from it.
<shrug> I leave this conversation as I leave every conversation about
concepts: just as confused as when I started. I write template libraries
and care about error messages. Concepts were billed as a way to improve
error messages from template libraries. And yet nobody can tell me how
to actually use concepts to implement my libraries and improve error
messages.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk