Boost logo

Boost :

Subject: Re: [boost] New libraries implementing C++11 features in C++03
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2011-11-24 07:17:25


On Thu, Nov 24, 2011 at 11:08 PM, Brent Spillner <spillner_at_[hidden]> wrote:
>
> Yes, it's possible to wade through the error messages and figure out
> what went wrong.  And Qi is clearly trying to help out with traceable
> assertions; that may well be the best we can do.  But no reasonable
> person would claim that hundreds of lines of error message, mostly
> filled with types that the user never directly constructed, are the
> most desirable way to report a simple syntax error.  This problem is
> endemic to all ET libraries and compilers, and it would be very, very
> hard to do much better.  Again, though, I think you're underselling
> this as a barrier to entry.  How many people would ever learn C++ if
> all libraries did this?
>

The "unintelligible" error messages are *not* the fault of the library.

The *compiler* spews out these error messages. There's nothing you can
do in C++ code to tell the compiler to "output exactly this message if
you find an error here" -- sure with C++11 you can use static_assert
but you can't control what the compiler will print (unless you're
writing the compiler).

Seriously, I don't know why people are blaming the libraries when the
compilers are the ones generating these error messages. Am I missing
something here?

>>Now having said that, and before I leave this thread, let me remind
>>everyone that **you can also have statement syntax in Phoenix** if you
>>have a complex statement and you fear writing complex phoenix lambda
>>expressions. It's called phoenix::functions.
>
> The important issue here isn't just statement /syntax/, it's that we
> have options available that don't turn what looks like an ordinary C++
> statement into a massive AST with its own mini-compiler behind the
> scenes.
>

You're right. In this case, it's called functions -- normal namespace
or class scope functions. They work perfectly fine.

I still don't get it. Am I missing anything here?

Cheers

-- 
Dean Michael Berris
http://goo.gl/CKCJX

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