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
Allow ← and → as well as ⇒ #988
Comments
Imported From: https://issues.scala-lang.org/browse/SI-988?orig=1 |
Geoffrey Alan Washburn (washburn) said: |
@lexspoon said: These problems are real productivity killers when they crop up, thus outweighing the advantages of having nice-looking glyphs. In addition, there is nothing stopping an IDE from displaying Scala code using nicer glyphs.... |
Geoffrey Alan Washburn (washburn) said: |
@lexspoon said: |
Geoffrey Alan Washburn (washburn) said: |
@dragos said: |
@lexspoon said: Iulian, I agree except that I suspect too few people use the Unicode right arrow for us to really draw conclusions. Do you know of any uses in the wild? I bet if we checked some right arrows into the compiler repository, most people wouldn't notice, but an occasional person would get stuck when their svn chose UTF-8 but their scalac chose Latin-1. In fact, if there are a lot of people tempted to add more Unicode support, how about we start with just that experiment? Check in a Unicode right arrow and then see if anyone gets tripped up by it. If after a few months not a person has been tripped up, then I retract my objection. If someone does complain, though, we would have evidence that even the existing right arrow support should be deprecated. |
andrewf said: IDEs could choose to display => as ⇒ but you know that they probably won’t. Or at least, the ones everybody uses won’t. Some people might have problems when checking out and trying to compile Unicode, under some circumstances. For public code bases (like the Scala runtime libraries), I’d understand (and even support) an ASCII-only rule… But it seems odd to banish the opportunity to use the ‘right’ character for the right purpose just because a lot of tools and systems still don’t have seamless Unicode support yet. Mine does and I’d like to make use of it! By the same token, French, Norwegian and Japanese are able to use their native characters in identifiers. You might as well stop them doing so on the basis that it creates potential portability problems. |
Geoffrey Alan Washburn (washburn) said: |
Andrew Foggin (andyfoggin) said: |
Geoffrey Alan Washburn (washburn) said: |
the unicode arrows are deprecated in Scala 2.13 (as per scala/scala#7540) |
How very exciting! Scala is the first language I’ve programmed in which has a Unicode character, ⇒, as one of the built-in language operators!
However, in ‘for’ statements, one must still use primitively-constructed ASCII arrows, as in
for(v <- blah) stuff
. Please can you allowfor(v ← blah) stuff
.Also, for writing pairs,
key → value
would be nice.Thank you very much.
The text was updated successfully, but these errors were encountered: