Re: Unhelpful error messages

2013-07-12 Thread H. S. Teoh
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

Re: Unhelpful error messages

2013-07-10 Thread H. S. Teoh
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

Re: Unhelpful error messages

2013-07-10 Thread Don
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: On Monday, 8 July 2013 at 18:10:45 UTC, H. S. Teoh wrote: >On Sun, Jul 07, 2013 at 02:06:46PM +0200, Peter Alexander >wrote: >>It's a tough situation and I think the only w

Re: Unhelpful error messages

2013-07-08 Thread H. S. Teoh
On Mon, Jul 08, 2013 at 09:47:46PM +0200, Peter Alexander wrote: > On Monday, 8 July 2013 at 18:10:45 UTC, H. S. Teoh wrote: > >On Sun, Jul 07, 2013 at 02:06:46PM +0200, Peter Alexander wrote: > >>It's a tough situation and I think the only way this could even > >>reasonably be resolved is through

Re: Unhelpful error messages

2013-07-08 Thread Peter Alexander
On Monday, 8 July 2013 at 18:10:45 UTC, H. S. Teoh wrote: On Sun, Jul 07, 2013 at 02:06:46PM +0200, Peter Alexander wrote: It's a tough situation and I think the only way this could even reasonably be resolved is through some sophisticated IDE integration. There is no way to display this kind of

Re: Unhelpful error messages

2013-07-08 Thread H. S. Teoh
On Sun, Jul 07, 2013 at 02:06:46PM +0200, Peter Alexander wrote: [...] > The problem here is more general than this specific case. Any > template constraint on any function could fail to pass, and the best > error you'll get is that it couldn't match any function. Even if the > error messages were

Re: Unhelpful error messages

2013-07-07 Thread Peter Alexander
On Sunday, 7 July 2013 at 06:58:29 UTC, Maxim Fomin wrote: http://d.puremagic.com/issues/ Ironically, this isn't helpful. H. S. Teoh is opening up a discussion, not reporting a bug. The problem here is more general than this specific case. Any template constraint on any function could fail

Re: Unhelpful error messages

2013-07-07 Thread Maxim Fomin
http://d.puremagic.com/issues/

Unhelpful error messages

2013-07-06 Thread H. S. Teoh
I'm posting this here 'cos I've no idea how to improve it, but it's definitely a problem: First, let's define a struct that overloads opCast: struct S { T opCast(T)() if (is(T == struct)) { T t;