DIP 1015--removal of implicit conversion from integer and character literals to bool--Community Review Round 1
Jacob Carlborg
doob at me.com
Sat Jun 23 08:03:40 UTC 2018
On 2018-06-22 17:46, Steven Schveighoffer wrote:
> On 6/22/18 11:31 AM, Jacob Carlborg wrote:
>> On 2018-06-20 10:16, Mike Parker wrote:
>>> This is the feedback thread for the first round of Community Review for
>>> DIP 1015, "Deprecation and removal of implicit conversion from integer
>>> and character literals to bool":
>>
>> The text says: "Only literals that evaluate to 0 or 1 are affected;
>> all other literals are to remain unchanged" [1]. This goes against
>> example A [2].
>>
>> [1]
>> https://github.com/dlang/DIPs/blob/7c2c39243d0d747191f05fb08f87e1ebcb575d84/DIPs/DIP1015.md#description
>>
>>
>> [2]
>> https://github.com/dlang/DIPs/blob/7c2c39243d0d747191f05fb08f87e1ebcb575d84/DIPs/DIP1015.md#example-a
>>
>>
>
> Which literals don't evaluate to 0 or 1 in example A?
I read that as only the 0 and 1 literals would be affected by this
proposal, i.e. the integer literals. But the examples are mentioning
character literals as well. But if the character literals are evaluated
to 0 or 1, perhaps everything is covered. But at least to me it's a bit
unclear.
> Also, example A is just showing what currently compiles, not what is to
> be affected.
Then Example D is a better example [1].
[1]
https://github.com/dlang/DIPs/blob/7c2c39243d0d747191f05fb08f87e1ebcb575d84/DIPs/DIP1015.md#example-d
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list