March 19, 2012 Re: Keyword arguments / Named parameters library implementation | ||||
|---|---|---|---|---|
| ||||
On 3/19/12, Matthias Walter <xammy@xammy.homelinux.net> wrote: > Hi, > > I've written a small module (at the moment called utils.keywordargs) > which simulates keyword arguments (aka named parameters). Cool. A small tip (in case you didn't already know): You can use allSatisfy from std.typetuple when checking a single constraint on multiple parameters: static assert(allSatisfy!(isKeywordArgument, H, V)); | ||||
March 20, 2012 Re: Keyword arguments / Named parameters library implementation | ||||
|---|---|---|---|---|
| ||||
On 03/19/2012 08:21 PM, Andrej Mitrovic wrote:
> On 3/19/12, Matthias Walter <xammy@xammy.homelinux.net> wrote:
>> Hi,
>>
>> I've written a small module (at the moment called utils.keywordargs)
>> which simulates keyword arguments (aka named parameters).
>
> Cool. A small tip (in case you didn't already know):
>
> You can use allSatisfy from std.typetuple when checking a single
> constraint on multiple parameters: static
> assert(allSatisfy!(isKeywordArgument, H, V));
Didn't know that - thanks a lot!
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply