-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable width char #864
base: master
Are you sure you want to change the base?
Variable width char #864
Conversation
This makes it possible to use wider character types to represent Unicode code points beyond the first 256. See #863.
Consider making the built-in Line 63 in eed0bde
I'm guessing this might break a few more things, though. |
Or we could leave |
Printing strings is only working for monomorphic 8-bit strings.
|
‘Char’ is pretty reminiscent of the C type, which is (mostly) just 8-bits. I suggest it stays 8-bits. |
As for string printing, we'll have to decide what we want. When Or maybe we could have a few different settings for the |
I like that last idea. I suppose if we're going to support printing of bit-sizes greater than 8, we probably shouldn't call this We could allow users to set Maybe:
|
Just to be clear, this does not implement variables width characters (e.g., as in UTF-8) but rather overloaded characters, correct? If so, I think using I don't have an opinion on what we should do here, but if we merge this version we should remember to update the book also, as it likely has examples involving characters. |
I think |
Here's the Gold-Bug example that @WeeknightMVP and I were playing with. Loads fine with this PR. |
Have we achieved consensus on what to do about this? I got the impression we had decided this generalization was broadly something we wanted to do, and the only remaining questions were about the UI aspects of controlling the pretty-printing. Is that correct? |
This PR removes the constraint that character literals (and strings) have type
[8]
; instead, they are treated exactly like decimal literals, and have a polymorphic type. See #863.