Template Constraints
psychoticRabbit
meagain at meagain.com
Sat Feb 24 04:33:52 UTC 2018
On Saturday, 24 February 2018 at 04:22:12 UTC, Jonathan M Davis
wrote:
> Why is there anything dodgy going on and why would you need
> contracts? Contracts actually tend to go very badly with
> generic code, because whatever they assert has to be generic,
> and while that works sometimes, more often than not, it doesn't.
>
> - Jonathan M Davis
what if 3.3 is passed to the template, and it explicately casts
it to an int.
To me, that would be dodgy - unless there was a contract, that I
had accepted and agreed to, so that this not dodgy.
More information about the Digitalmars-d-learn
mailing list