Boost logo

Proto :

Subject: Re: [proto] for your review: intro to a series of blog posts about proto and phoenix v3
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2010-08-10 15:45:00


On Tue, Aug 10, 2010 at 6:56 PM, Eric Niebler <eric_at_[hidden]> wrote:
> On 8/10/2010 12:03 PM, Thomas Heller wrote:
>> On Tue, Aug 10, 2010 at 5:21 PM, Eric Niebler <eric_at_[hidden]> wrote:
>>> On 8/10/2010 11:14 AM, Robert Jones wrote:
>>>> When you get this
>>>> stuff wrong, what do the error messages look like? Boost.Bind &
>>>> Boost.Lambda errors are already enough to send most of us running for
>>>> the hills,
>>>
>>> (I've held back a whole rant about how long template
>>> error messages are library bugs and should be filed as such. That's a
>>> whole other blog post.)
>>
>> I think we see a great improvement with static_assert in C++0x!
>
> Undoubtedly true, but I can't confirm firsthand. I don't do any C++0x
> programming.
>
>> And we are potentially able to reduce error message if SFINAE is
>> applied more often, with the disadvantage of losing information on
>> what failed.
>
> I disagree about SFINAE. I think it leads to horrible error messages
> like, "No function overload matched. Here are the signatures of the (5,
> 20, 100+) functions that failed to match (and I'm not going to tell you
> why)". I've had better luck with tag dispatching, with a catch-all
> handler that asserts with a "if-you-get-here-it-means-this" message.

You got me a little wrong here, i don't like the "no matching function
call bla" error message either. It is just wanted to say that you have
the *possibility* to shorten your error messages.
I like the idea of tag dispatching, never came to my mind to use it
for error generating error messages ;)

Anyway, i think we will have to go a long way to have good error
messages in highly templated code.

> But all that will go in my rant. ;-)

Looking forward to it.


Proto list run by eric at boostpro.com