A few questions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Mon Jun 29 18:38:45 UTC 2020


On 6/29/20 2:32 PM, Yatheendra wrote:
> On Monday, 29 June 2020 at 16:56:37 UTC, Andrei Alexandrescu 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.
> 
> Thanks for providing an anchor point for a clean-up effort.
> 
> Any more specifics? Like just spelling out if @nogc is a consideration.

A nogc subset would also be nice, but more difficult to define.

Any attempt to version std or carve subsets thereof would need an early 
experiment that is relatively easy from a coding standpoint. That way 
the work can focus on the scaffolding aspects (does lookup work well? 
how do we do documentation and testing? any incompatibility issues? etc) 
without getting also mired in new bugs and other technical issues.


More information about the Digitalmars-d mailing list