Error message improvement ideas

NX via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 20 03:59:05 PST 2015


On Friday, 18 December 2015 at 18:55:29 UTC, Adam D. Ruppe wrote:
> [...]
The biggest problem is overly templated functions. We should 
seriously find a way to make them error friendly. Maybe:
auto find(Range : [InputRange], V)(Range haystack, V needle)
Rather than:
auto find(Range, V)(Range haystack, V needle) 
if(isInputRange!Range)
But I'm sure core d devs will strike with a "we can't change 
semantics, it would break existing code" argument...


More information about the Digitalmars-d mailing list