[Tidbit] making your D code more modular & unittestable

bpr via Digitalmars-d digitalmars-d at puremagic.com
Fri Mar 10 09:20:28 PST 2017


On Friday, 10 March 2017 at 14:58:09 UTC, Nick Treleaven wrote:
> On Thursday, 9 March 2017 at 20:54:23 UTC, Nick Sabalausky
>> Wishlist for D3: Some brilliant form of sugar for declaring a 
>> function that takes a range.
>
> auto parseFile()(auto input if isRandomAccessRangeOf!ubyte && 
> hasSlicing) {
>
> My spin on an inline parameter constraint idea by Kenji (his 
> doesn't use auto and also has more concept-like sugar):
>
> https://wiki.dlang.org/User:9rnsr/DIP:_Template_Parameter_Constraint
>
> As mentioned in the link, inline constraints can help make more 
> specific error messages when constraints fail.

That looks like a useful DIP. What has to happen to move it to 
the DIP repository 
https://github.com/dlang/DIPs/blob/master/GUIDELINES.md ?






More information about the Digitalmars-d mailing list