-
Notifications
You must be signed in to change notification settings - Fork 644
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
Support unicode characters for operators #694
Conversation
I don't want to support unicode operators for several reasons:
I know that used with care it can make things look pretty. But so can lhs2TeX. And I'm sure that in a few years time things will be different and software will cope better and it will make sense to revisit this. For now, however, I would prefer not to allow arbitrary unicode symbols in operators. (Aside: There could even be an argument that allowing arbitrary operators is going a bit far...) On another note (from an irc comment): Just because people might want a feature doesn't necessarily make it a good idea to support that feature. It's important to think about the implications of that feature, how it might interact with other features, what it allows, what it prevents, and so on. We do need Unicode support in Char and String, of course. Better to focus on that first. This seems like an instance of Wadler's Law (http://www.haskell.org/haskellwiki/Wadler%27s_Law) in action. |
I thought this was highly uncontroversial and it was a simple addition, so I thought why not just add it. In any way, I also fixed the eol to correctly handle unicode characters. Do you want that addition in a separate pull request? |
I'd think I'd be for this, but I don't really use unicode operators in code I intend on sharing with other people. I think the unicode glyphs that look like their existing ascii-art equivalents are unambiguous enough: http://www.scala-lang.org/old/node/4723 |
Generally, I've been typing ascii-art, and if I want to see the unicode characters, I use a transformation on my view of the file, like https:/vim-scripts/Haskell-Conceal/blob/master/after/syntax/haskell.vim#L35 |
Unicode is discouraged according to idris-lang#694 (comment)
3.5 years later, is this something we should reconsider having again now? |
No, I still think @edwinb's reasons hold. |
We already support Unicode for identifiers, this would allow defining operators as Unicode too. There should probably be a flag in the future to disable Unicode support entirely (but that will take some time to implement, where this was a one-liner).