Maybe D was wrong on contracts

Quirin Schroll qs.il.paperinik at gmail.com
Wed Sep 23 14:43:13 UTC 2026


On Wednesday, 16 September 2026 at 20:00:57 UTC, Alexandru 
Ermicioi wrote:
> On Wednesday, 16 September 2026 at 10:28:08 UTC, Quirin Schroll 
> wrote:
>> ...
>> However, I’d still prefer `in(isGood(input), "input bad")`.
>
> In other words a tuple!
>
> With:
> 1. bool - the result of contract check
> 2. char, or interpolated string - the message in case of 
> contract failing.

A string can already be null. What else than “no error” would a 
null string signify?


More information about the Digitalmars-d mailing list