Subtraction of two chars
F# has addition of two chars.
let z = 'a' + '\025'
let Z = 'A' + '\025'
I propose we also add subtraction of two chars.
let a = 'z' - '\025'
let A = 'Z' - \025'
The existing way of approaching this problem in F# is
let (--) a b = int a - int b |> char
let a = 'z' -- '\025'
let A = 'Z' -- '\025'
Pros and Cons
The advantages of making this adjustment to F# are
- Consistency
- Convenience
- Conciseness
The disadvantage of making this adjustment to F# is that this treats chars more like ints which may confuse beginners. However, addition is already present. It's inconsistent to not have subtraction.
Extra information
Estimated cost (XS, S, M, L, XL, XXL): XS - Just add the overload
Related suggestions: None
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the 👍 emoji on this issue. These counts are used to generally order the suggestions by engagement.
Subtraction of two chars
F# has addition of two chars.
I propose we also add subtraction of two chars.
The existing way of approaching this problem in F# is
Pros and Cons
The advantages of making this adjustment to F# are
The disadvantage of making this adjustment to F# is that this treats
chars more likeints which may confuse beginners. However, addition is already present. It's inconsistent to not have subtraction.Extra information
Estimated cost (XS, S, M, L, XL, XXL): XS - Just add the overload
Related suggestions: None
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the 👍 emoji on this issue. These counts are used to generally order the suggestions by engagement.