My ACCU 2016 keynote video available online

Manu via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat May 21 06:46:51 PDT 2016


On 21 May 2016 at 19:55, Stefan Koch via Digitalmars-d-announce
<digitalmars-d-announce at puremagic.com> wrote:
> On Saturday, 21 May 2016 at 08:45:45 UTC, Manu wrote:
>>
>> Constraints are a good first-step in that direction, but they're unwieldy,
>> produce the worst looking function signatures (read: documentation) of
>> literally any language ever conceived, relatively awkward error feedback,
>> and very quickly get out of hand if you have many variations of possible
>> constraints.
>
>
> Constraints are enough for simple matters.
> As soon as they are used to distinguish between many overloads with
> complicated relationships they become slightly crude.
>
> However this can be worked around with having static ifs and static
> asserts(0).
> I find myself just one variadic template with a lot of static ifs branches.

I also find myself taking that route when I run into cases where there
are numerous constraint combinations. It's better in some ways, but
worse in others.
I think it simplifies API's, but at the same time, it removes
information from the API, and takes away a lot of documentation.


More information about the Digitalmars-d-announce mailing list