Why is std.algorithm so complicated to use?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jul 10 07:59:30 PDT 2012

On 7/10/12 9:59 AM, H. S. Teoh wrote:
> On Tue, Jul 10, 2012 at 09:28:51AM -0400, Andrei Alexandrescu wrote:
>> On 7/10/12 2:50 AM, Jacob Carlborg wrote:
>>> On 2012-07-09 22:16, Andrei Alexandrescu wrote:
>>>> So foo is a range of strings, because each element of it is a
>>>> string.  Then you want to chain a range of strings with a string,
>>>> which is a range of dchar. That doesn't work, and I agree the error
>>>> message should be more informative.
>>> Is that by design or something that can be fixed?
>> We can arrange things in the library that a custom message is issued,
>> or in the compiler to do it once for all.
> Please don't do it in the compiler. Custom messages should be in the
> library. Tying the compiler to phobos is a bad idea; druntime should be
> the only dependency.

The idea there being that the compiler could give good details about 
what part of a complex constraint has failed.


More information about the Digitalmars-d mailing list