You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unicode has a dedicated character meaning "unknown character": '\uFFFD'
Currently String.get returns "A" as default value, which might be a tiny bit unexpected and certainly an arbitrary choice.
In my opinion '\uFFFD' would be a slightly better choice.
User Experience: How does this feature improve the user experience?
It might be slightly more understandable if they see '\uFFFD' instead of a random 'A'.
If a user does s.get ⟨1⟩ where ⟨1⟩ is an invalid String.Pos, they get A returned, which might be confusing
Maintainability: Will this change streamline code maintenance or simplify its structure?
should have no impact on maintainability.
Community Feedback
Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion. I agree in spirit, but I'm not sure if this is the most pressing issue we have at the moment, given all the other things we could fix and the limited developer attention resources.
Also slightly worried that users will be confused to see a character that doesn't render nicely in whatever font they are using.
If you feel strongly about it (and its not just a ”sure why not change”) I suggest to just do it without much more discussion. Else maybe let's focus on other things that are more than “slightly better”, at least for now.
Proposal
Unicode has a dedicated character meaning "unknown character":
'\uFFFD'
Currently
String.get
returns "A" as default value, which might be a tiny bit unexpected and certainly an arbitrary choice.In my opinion
'\uFFFD'
would be a slightly better choice.User Experience: How does this feature improve the user experience?
It might be slightly more understandable if they see
'\uFFFD'
instead of a random'A'
.If a user does
s.get ⟨1⟩
where⟨1⟩
is an invalidString.Pos
, they getA
returned, which might be confusingMaintainability: Will this change streamline code maintenance or simplify its structure?
should have no impact on maintainability.
Community Feedback
Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: