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
Place restrictions on String content in relevant sections #3068
Place restrictions on String content in relevant sections #3068
Conversation
I agree that this would make sense, and better present the current status. However, this triggered that we should also consider allowing Unicode-characters (using UTF-8 that everyone seems to have converged on) - and in that case it would be slightly preferable to first switch to UTF-8 in one place, and then spread it like this. The reason is that Unicode is already sneaking into code: The practical implications of allowing UTF-8 instead of ASCII is minimal for the language itself; as we don't even have string-subscripting in the language and thus we don't have to standarize byte/code-point/grapheme-cluster
|
It is exactly because of the kind of things that you comment on that I wanted to make it clear where the specification stands at the moment. I thought that clearly expressing the current status would bring more light on these matters, and I can't see that it would be better to have the description of current situation tucked away in an appendix. Let's open another issue about the current limitations. |
Why would the specification need to standardize how to sort strings? There is no way to compare strings in the language itself. |
Compare strings: |
I didn't even realize that. I think I always see |
But not here. This PR is meant to not introduce any changes to the language. |
Yes, I understand. It was just that if we soon might add UTF-8 ( #3079 ) I think it is best to wait with this one. |
Not bad, but almost entirely removed (see below). The change in classes.tex is unnecessary if String-variables can contain any String from the language - and in syntax.tex the corresponding texts would just be removed (old and new). Note that I skipped the String-mapping for Fortran in #3079. We probably might add it even though Fortran-Strings are normally for Lapack/Blas arguments that should be ASCII. However, I don't fully understand the Fortran-support for Unicode and searches gave confusing results; e.g., https://fortranwiki.org/fortran/files/character_handling_in_Fortran.html (at the end). |
OK, but then the benefits of #3079 will shine even more. :) |
Considering the amount of discussion we had in the MSL issue modelica/ModelicaStandardLibrary#3789 without realizing that non-ASCII |
Since #3079 is accepted I believe we can close this one. |
Yes. Closing. |
This addresses the problem that the rather important restriction of what data a
String
may contain is hidden away in an appendix.