Project

General

Profile

Actions

Feature #9107

closed

Introduce YES and NO as aliases of true and false

Added by gsamokovarov (Genadi Samokovarov) over 10 years ago. Updated over 10 years ago.

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

Description

I have a patch introducing the constants YES/NO as aliases of true/false. You can check it out here: https://github.com/gsamokovarov/ruby/compare/trunk...yes-no

While I don't expect this to be accepted, I think it can start a discussion around supporting it.

There is a movement in recent languages to let YES/NO express TRUE/FALSE. Objective C, CoffeeScript and markup languages like YAML are some examples of that. I thing it works really well for ruby scripts, used as configuration files. The rails config/* files seem like great candidates for YES/NO usage.

Implementation wise, I choose to go with TRUE/FALSE like constants, rather than extra yes/no keywords as it seemed to me like the most unobtrusive way to introduce those.

Please, excuse me if this has been discussed before.


Files

yes-no.patch (1.73 KB) yes-no.patch gsamokovarov (Genadi Samokovarov), 11/13/2013 11:36 PM

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #6126: Introduce yes/no constants aliases for true/falseRejected03/10/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0