Feature #9107

Introduce YES and NO as aliases of true and false

Added by Genadi Samokovarov almost 2 years ago. Updated almost 2 years ago.

[ruby-core:58312]
Status:Rejected
Priority:Normal
Assignee:-

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.

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


Related issues

Duplicates Ruby trunk - Feature #6126: Introduce yes/no constants aliases for true/false Rejected 03/10/2012

History

#1 Updated by Yukihiro Matsumoto almost 2 years ago

  • Status changed from Open to Rejected

Define them by yourself in your application.
To be honestly, yes/no seems bit childish to me, a old guy.

Matz.

#2 Updated by Rodrigo Rosenfeld Rosas almost 2 years ago

Oh, man, Redmine should have a "like" feature just like Facebook ;)

#3 Updated by Eric Hodel almost 2 years ago

On 13 Nov 2013, at 08:16, rosenfeld (Rodrigo Rosenfeld Rosas) rr.rosas@gmail.com wrote:

Issue #9107 has been updated by rosenfeld (Rodrigo Rosenfeld Rosas).

Oh, man, Redmine should have a "like" feature just like Facebook ;)

What would liking help? Ruby is not a democracy.

#4 Updated by Rodrigo Rosenfeld Rosas almost 2 years ago

I was just kidding, Eric. I liked Matz comment, that's all :)

Also available in: Atom PDF