Unhelpful error messages

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jul 10 09:34:34 PDT 2013


On Wed, Jul 10, 2013 at 03:05:25PM +0200, Don wrote:
> On Monday, 8 July 2013 at 20:46:35 UTC, H. S. Teoh wrote:
> >On Mon, Jul 08, 2013 at 09:47:46PM +0200, Peter Alexander wrote:
[...]
> >>Maybe the compiler could just spew out every possible error for
> >>every instantiation, and expect the user to grep, but that's not
> >>going to be a pleasant experience.
> 
> The compiler could join all the constraints and then simplify it to
> create the error message. (eg by creating a Binary Decision Diagram
> (BDD))
> 
> eg given constraints:
> 
> if ( A  && B && C )
> if ( (A  && D) || ( A && E && F) )
> if ( E && G )
> 
> Suppose A is true but the conditions fail. The compiler could then
> write that no templates match because ( B || D || E ) is false.

+1. Now that's cool, and is something actually implementable.  Can we
have this pretty please? :-)


T

-- 
The right half of the brain controls the left half of the body. This
means that only left-handed people are in their right mind. -- Manoj
Srivastava


More information about the Digitalmars-d mailing list