Deprecate implicit `int` to `bool` conversion for integer literals
Michael V. Franklin
slavo5150 at yahoo.com
Wed Nov 15 22:38:49 UTC 2017
On Tuesday, 14 November 2017 at 13:17:22 UTC, Steven
Schveighoffer wrote:
> The array handling is probably the only part that would be
> painful. but we could handle that the same way we deprecated
> octal numbers:
>
> bools!"01001101"; => [false, true, false, false, true, true,
> false, true];
Thanks for chiming in. `bool[] boolValues =
cast(bool[])[0,1,0,1]` will still work fine under option 1. It's
only *implicit* casting that's being proposed for deprecation.
Mike
More information about the Digitalmars-d
mailing list