Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upMake `Char.toCode` Roundtrip #747
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Nov 2, 2016
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Nov 2, 2016
|
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
crazymykl
commented
Nov 2, 2016
•
|
This is related to #387. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
crazymykl
Nov 4, 2016
I spoke with @rtfeldman , and losing O(1) length is a hard-no. I'd still like the functions on Char that convert from keycodes to roundtrip.
crazymykl
commented
Nov 4, 2016
|
I spoke with @rtfeldman , and losing |
crazymykl
changed the title from
Make Strings Transcend the Basic Material Plane
to
Make `Char.toCode` Roundtrip
Nov 4, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jahewson
Nov 4, 2016
Can a KeyCode actually contain a surrogate pair? As far as I'm aware KeyboardEvent.keyCode generates only ASCII and Windows-1252 characters.
Incidentally, a KeyCode from the Keyboard library is not even guaranteed to be Unicode, it could be Windows-1252. Seems like this could be a broader problem for Elm, which appears to assume that a KeyCode is a Unicode code point, because it mingles Keyboard and Char logic via KeyCode.
I suspect that the whole relationship between KeyCode and Char needs some re-thinking.
jahewson
commented
Nov 4, 2016
•
|
Can a Incidentally, a I suspect that the whole relationship between |
crazymykl commentedNov 2, 2016
•
edited
Edited 1 time
-
crazymykl
edited Nov 4, 2016 (most recent)
Synopsis
It's quite surprising that certain
Chars cannot be converted to integers and back losslessly.Open Questions
Char.fromCodekeep its existing behavior when given anIntoutside of the range of valid Unicode. Should it be madeKeyCode -> Maybe Charinstead?