-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
leads questionA question for the leads teamA question for the leads team
Description
Summary of issue:
Following up on #5903, another question about characters: what operators should Char support, and what should their return values be?
Details:
For background, in #1964, it says (summarizing):
- Comparison:
<,>,<=,>=== - Arithmetic:
+,- - Explicit conversions to integers, no implicit
- No statement on conversions from integers.
It gives an example using these in rationale:
var b: u8;
b = 'a' + 1;
b + 1 == 'c';
This example implies the two operator behaviors:
'a' + 1returnsu8(because there's no implicit conversion from an integer)- Comparison between
u8andCharworks.
However, other parts of the proposal seem to suggest that neither of those operators should work that way.
Metadata
Metadata
Assignees
Labels
leads questionA question for the leads teamA question for the leads team