A few questions

aliak something at something.com
Mon Jun 29 22:58:28 UTC 2020


On Monday, 29 June 2020 at 16:56:37 UTC, Andrei Alexandrescu 
wrote:
> On 6/26/20 10:30 PM, Yatheendra wrote:
>> [...]
>
> I think the first order of business would be to have a nothrow 
> core that defines correcntess of inputs as preconditions. The 
> rest of the library can use it underneath. For example 
> maxElement would have a precondition that the range is not 
> empty etc.
>
> That also means finding new ways for APIs. std.conv.to would 
> need a lambda to call if conversion fails, thus pushing policy 
> to the caller.

Or return a SumType/Either/Expected/etc?


More information about the Digitalmars-d mailing list