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

Chapter: Basic values and types #6

Open
rauschma opened this Issue Feb 7, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@rauschma
Owner

rauschma commented Feb 7, 2018

No description provided.

@xin-nie

This comment has been minimized.

xin-nie commented Feb 8, 2018

Should last sentence be === is the preferred equality operator (unless you really want to compare references). instead of == is the preferred equality operator (unless you really want to compare references).

@farisk

This comment has been minimized.

farisk commented Feb 9, 2018

The text is correct as is, === compares references whilst == compares values.

@RasmusKlett

This comment has been minimized.

RasmusKlett commented Mar 16, 2018

After some discussion on Discord, I think the claim

ReasonML strings are encoded as UTF-8 and not compatible with JavaScript’s UTF-16 strings

Is wrong. It also goes against the docs here:

Since a Reason string maps to a JavaScript string, you can mix & match the string operations in both standard libraries

What really seems to happen is that if you use Reason string literals, it encodes in utf-8 but saves it to a JS-string. So the underlying type does support Unicode, and there is full interoperation between JS-strings and Reason strings. You just need to use the JS syntax to express unicode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment