Project

General

Profile

Actions

Feature #715

closed

Ruby interpreter should understand UTF-8 symbols with special meaning

Added by Fjan (Jan Maurits Faber) about 16 years ago. Updated over 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:19714]

Description

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:

a>=b ? {:a=>!b} : nil

Could be displayed as:

ab ? :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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0