The literal quotes should accept more quote characters (aka more unicode characters)
I frequently use literal quoting, aka %q, %w, %i
I'd like to suggest that the set of quoting characters should be extended.
I believe that some pairs of unicode character should also be allowed as paired quoting characters.
Actually some characters from the unicode math symbol plane come in pairs and would be candidates.
I found some initial reference here: http://xahlee.info/comp/unicode_matching_brackets.html
This obviously would extend the syntax parsing rules beyond ascii,
but we are there already, and it would not break existing ascii codes.
I believe this could be useful in two scenarios:
- it would add expressiveness to math codes
- it would remove ambiguities for ascii literals
I'm more interested in the later.
it would be helpful to bracket that code with a unicode bracket,
because that bracket would not occur within the literal.
Another option would be (I should try this)
to enclose in:
but I believe this will break existing code.
Sorry for reporting on the literals again,
please look up my previous feature requests on this topic.
I'm not even sure if we should go beyond ascii.
But ruby is fully unicode already (another first)
I believe this could really add to how ruby code looks.
Imagine some Math code using unicode math symbols.
I believe that the set of characters that we might use to write our code
should no longer bound by a standard set by the americans in the early 70's,
and even then based one the least common denominator from the 6bit age.
But now days there are so many more chars,
so we need to clearly define which ones are allowed,
in this case: which ones we newly accept as bracketing chars.
I previously asked about chars from the unicode operators plane.
I'd like to suggest that this should be a twofold process:
- mark ranges of unicode as reserved for further use (aka exclude them from use as identifiers)
- include chars explicitely as to be use as operators or bracketing chars
Updated by matz (Yukihiro Matsumoto) over 6 years ago
- Tracker changed from Bug to Feature
- Status changed from Open to Feedback
You didn't explain why we should extend. Extending quote characters can cause confusion.
We cannot accept it without concrete use-case or benefit description.