From: matthew@... Date: 2016-06-10T14:20:27+00:00 Subject: [ruby-core:75945] [Ruby trunk Feature#715] Ruby interpreter should understand UTF-8 symbols with special meaning Issue #715 has been updated by Matthew Kerwin. Jan Maurits Faber wrote: > It's really easy to remember: to type ��� is just alt + >, to type ��� is alt + < and ��� is alt + =, so I don't think you would need a character picker for very long. But more importantly using the new symbols would be entirely optional. If you don't like them then the ASCII way would of course keep working forever. I just opened up Notepad++ (my editor of choice at the moment on Windows) and tried alt + =. Didn't work. Doesn't work here in Chrome either. In fact, I can't type ��� using my keyboard at all, even with the magic Alt+numpad combinations. This is a pretty typical US-101 keyboard, in one of the most used operating systems in the world. Considering there are users for whom curly braces `{}` are enough of an issue that they prefer to avoid block forms at all costs (trying to cram as much as possible into to_proc'd `&foo` forms; see previous discussions on the Ruby Talk mailing list about that, and look at e.g. the Italian keyboard layout), I think adding even more niche characters to the core repertoire is a bad idea. Also `a���b ? :a ��� ��b : ���` is *really* hard for me to understand. I'm not a mathematician. Please don't write that in any code I may have to one day maintain. ---------------------------------------- Feature #715: Ruby interpreter should understand UTF-8 symbols with special meaning https://bugs.ruby-lang.org/issues/715#change-59140 * Author: Jan Maurits Faber * Status: Rejected * Priority: Normal * Assignee: ---------------------------------------- I would like the ruby interpreter to understand symbols such as the greater-than-or-equal sign, as an alias for '>='. This is not simply because it would look pretty, it would reduce the cognitive load on the programmer. At the moment many ascii characters are overloaded to mean different things in different contexts. Especially characters like $, :, > and =. If the relevant symbols were used then the brains of the programmer would be free to do more useful things. For example, something like: ```ruby a>=b ? {:a=>!b} : nil ``` Could be displayed as: ```ruby a���b ? :a ��� ��b : ��� ``` (in case the UTF-8 characters don't come across: I just replaced several characters with mathematical symbols) If the Ruby interpreter would support this then text editors can be improved to automatically insert the appropriate symbol. I don't know of any language that can do this yet, so it would be a unique selling point for Ruby, but it would seem rather easy to implement. -- https://bugs.ruby-lang.org/ Unsubscribe: