ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:83107] Alias Enumerable#include? to Enumerable#includes?
@ 2017-10-04 16:11 Alberto Almagro
  2017-10-05  1:25 ` [ruby-core:83113] " Urabe, Shyouhei
  2017-10-06  7:04 ` [ruby-core:83149] " Eric Wong
  0 siblings, 2 replies; 9+ messages in thread
From: Alberto Almagro @ 2017-10-04 16:11 UTC (permalink / raw
  To: ruby-core


[-- Attachment #1.1: Type: text/plain, Size: 554 bytes --]

Hello,

this was mentioned at Euruko's conference by Bozhidar Batsov and fully
resonated with my own personal experience using Ruby. As I tweeted after
the conference I would like to contribute to make Ruby better, and
aliasing Enumerable#include? with Enumerable#includes? would be a great
start. I simply can't remember how many times I have written includes?
instead of include? Last Saturday I definitely confirmed that I'm not the
only one. What do you think?

If possible I offer me volunteer to write and submit the patch myself.

Thanks!
Alberto

[-- Attachment #1.2: Type: text/html, Size: 671 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]


Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:83113] Re: Alias Enumerable#include? to Enumerable#includes?
  2017-10-04 16:11 [ruby-core:83107] Alias Enumerable#include? to Enumerable#includes? Alberto Almagro
@ 2017-10-05  1:25 ` Urabe, Shyouhei
  2017-10-05 10:59   ` [ruby-core:83129] " Alberto Almagro
  2017-10-06  7:04 ` [ruby-core:83149] " Eric Wong
  1 sibling, 1 reply; 9+ messages in thread
From: Urabe, Shyouhei @ 2017-10-05  1:25 UTC (permalink / raw
  To: Ruby developers

This has been requested countless times, then rejected each and every time.
See also https://bugs.ruby-lang.org/issues/5555

2017-10-05 1:11 GMT+09:00 Alberto Almagro <albertoalmagro@gmail.com>:
> Hello,
>
> this was mentioned at Euruko's conference by Bozhidar Batsov and fully
> resonated with my own personal experience using Ruby. As I tweeted after the
> conference I would like to contribute to make Ruby better, and aliasing
> Enumerable#include? with Enumerable#includes? would be a great start. I
> simply can't remember how many times I have written includes? instead of
> include? Last Saturday I definitely confirmed that I'm not the only one.
> What do you think?
>
> If possible I offer me volunteer to write and submit the patch myself.
>
> Thanks!
> Alberto
>
>
> Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:83129] Re: Alias Enumerable#include? to Enumerable#includes?
  2017-10-05  1:25 ` [ruby-core:83113] " Urabe, Shyouhei
@ 2017-10-05 10:59   ` Alberto Almagro
  2017-10-06  0:50     ` [ruby-core:83138] " Urabe, Shyouhei
  0 siblings, 1 reply; 9+ messages in thread
From: Alberto Almagro @ 2017-10-05 10:59 UTC (permalink / raw
  To: Ruby developers


[-- Attachment #1.1: Type: text/plain, Size: 1422 bytes --]

Sorry I didn't found it on the core mail list's archive.

In my opinion if something has been requested countless times it must be
for something. Is the core team kind to include those features most
requested by language users?

Thanks

2017-10-05 3:25 GMT+02:00 Urabe, Shyouhei <shyouhei@ruby-lang.org>:

> This has been requested countless times, then rejected each and every time.
> See also https://bugs.ruby-lang.org/issues/5555
>
> 2017-10-05 1:11 GMT+09:00 Alberto Almagro <albertoalmagro@gmail.com>:
> > Hello,
> >
> > this was mentioned at Euruko's conference by Bozhidar Batsov and fully
> > resonated with my own personal experience using Ruby. As I tweeted after
> the
> > conference I would like to contribute to make Ruby better, and aliasing
> > Enumerable#include? with Enumerable#includes? would be a great start. I
> > simply can't remember how many times I have written includes? instead of
> > include? Last Saturday I definitely confirmed that I'm not the only one.
> > What do you think?
> >
> > If possible I offer me volunteer to write and submit the patch myself.
> >
> > Thanks!
> > Alberto
> >
> >
> > Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=
> unsubscribe>
> > <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
> >
>
> Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>

[-- Attachment #1.2: Type: text/html, Size: 2479 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]


Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:83138] Re: Alias Enumerable#include? to Enumerable#includes?
  2017-10-05 10:59   ` [ruby-core:83129] " Alberto Almagro
@ 2017-10-06  0:50     ` Urabe, Shyouhei
  2017-10-06  6:22       ` [ruby-core:83148] " Alberto Almagro
  0 siblings, 1 reply; 9+ messages in thread
From: Urabe, Shyouhei @ 2017-10-06  0:50 UTC (permalink / raw
  To: Ruby developers

Ruby has not been made of popular votes so far.  You have to show us
(especially Matz) the reason to change his decision.  Do you have
anything new apart from the previous discussion?

2017-10-05 19:59 GMT+09:00 Alberto Almagro <albertoalmagro@gmail.com>:
> Sorry I didn't found it on the core mail list's archive.
>
> In my opinion if something has been requested countless times it must be for
> something. Is the core team kind to include those features most requested by
> language users?
>
> Thanks
>
> 2017-10-05 3:25 GMT+02:00 Urabe, Shyouhei <shyouhei@ruby-lang.org>:
>>
>> This has been requested countless times, then rejected each and every
>> time.
>> See also https://bugs.ruby-lang.org/issues/5555
>>
>> 2017-10-05 1:11 GMT+09:00 Alberto Almagro <albertoalmagro@gmail.com>:
>> > Hello,
>> >
>> > this was mentioned at Euruko's conference by Bozhidar Batsov and fully
>> > resonated with my own personal experience using Ruby. As I tweeted after
>> > the
>> > conference I would like to contribute to make Ruby better, and aliasing
>> > Enumerable#include? with Enumerable#includes? would be a great start. I
>> > simply can't remember how many times I have written includes? instead of
>> > include? Last Saturday I definitely confirmed that I'm not the only one.
>> > What do you think?
>> >
>> > If possible I offer me volunteer to write and submit the patch myself.
>> >
>> > Thanks!
>> > Alberto
>> >
>> >
>> > Unsubscribe:
>> > <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
>> > <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>> >
>>
>> Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>
>
>
>
> Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:83148] Re: Alias Enumerable#include? to Enumerable#includes?
  2017-10-06  0:50     ` [ruby-core:83138] " Urabe, Shyouhei
@ 2017-10-06  6:22       ` Alberto Almagro
  2017-10-06  8:38         ` [ruby-core:83153] " Martin J. Dürst
  0 siblings, 1 reply; 9+ messages in thread
From: Alberto Almagro @ 2017-10-06  6:22 UTC (permalink / raw
  To: Ruby developers

Well, Matz told us a the Euruko conference that this wasn’t his language anymore but the community's. He told us, he created it but it was our responsibility as a community to keep it growing and changing. You mentioned before this was requested uncountable times. If a language which claims to be for the programmer's joy isn’t able to simply alias one method requested uncountable times I don’t see how can I justify this better than with uncountable language users votes. Isn’t that far more than enough?


> El 6 oct 2017, a las 2:50, Urabe, Shyouhei <shyouhei@ruby-lang.org> escribió:
> 
> Ruby has not been made of popular votes so far.  You have to show us
> (especially Matz) the reason to change his decision.  Do you have
> anything new apart from the previous discussion?
> 
> 2017-10-05 19:59 GMT+09:00 Alberto Almagro <albertoalmagro@gmail.com>:
>> Sorry I didn't found it on the core mail list's archive.
>> 
>> In my opinion if something has been requested countless times it must be for
>> something. Is the core team kind to include those features most requested by
>> language users?
>> 
>> Thanks
>> 
>> 2017-10-05 3:25 GMT+02:00 Urabe, Shyouhei <shyouhei@ruby-lang.org>:
>>> 
>>> This has been requested countless times, then rejected each and every
>>> time.
>>> See also https://bugs.ruby-lang.org/issues/5555
>>> 
>>> 2017-10-05 1:11 GMT+09:00 Alberto Almagro <albertoalmagro@gmail.com>:
>>>> Hello,
>>>> 
>>>> this was mentioned at Euruko's conference by Bozhidar Batsov and fully
>>>> resonated with my own personal experience using Ruby. As I tweeted after
>>>> the
>>>> conference I would like to contribute to make Ruby better, and aliasing
>>>> Enumerable#include? with Enumerable#includes? would be a great start. I
>>>> simply can't remember how many times I have written includes? instead of
>>>> include? Last Saturday I definitely confirmed that I'm not the only one.
>>>> What do you think?
>>>> 
>>>> If possible I offer me volunteer to write and submit the patch myself.
>>>> 
>>>> Thanks!
>>>> Alberto
>>>> 
>>>> 
>>>> Unsubscribe:
>>>> <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
>>>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>>>> 
>>> 
>>> Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
>>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>> 
>> 
>> 
>> 
>> Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>> 
> 
> Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:83149] Re: Alias Enumerable#include? to Enumerable#includes?
  2017-10-04 16:11 [ruby-core:83107] Alias Enumerable#include? to Enumerable#includes? Alberto Almagro
  2017-10-05  1:25 ` [ruby-core:83113] " Urabe, Shyouhei
@ 2017-10-06  7:04 ` Eric Wong
  2017-10-06  7:21   ` [ruby-core:83150] " Alberto Almagro
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Wong @ 2017-10-06  7:04 UTC (permalink / raw
  To: ruby-core

Alberto Almagro <albertoalmagro@gmail.com> wrote:
> this was mentioned at Euruko's conference by Bozhidar Batsov and fully
> resonated with my own personal experience using Ruby. As I tweeted after
> the conference I would like to contribute to make Ruby better, and
> aliasing Enumerable#include? with Enumerable#includes? would be a great
> start. I simply can't remember how many times I have written includes?
> instead of include? Last Saturday I definitely confirmed that I'm not the
> only one. What do you think?

Having multiple names for the same thing increases learning,
review, optimization, and implementation costs.  IMHO, Ruby
already has too many aliases which make things more difficult
than they should be; we should not add more aliases.


Furthermore, there are many classes outside Enumerable with
"include?" which would also need "includes?" for consistency if
your change were accepted.  This also applies to 3rd-party
libraries like Rack and Rails which subclass core Ruby classes
or define workalike "include?" methods for databases or
case-insensitive hashes.

Introducing a second name would be harmful to polymorphic use.

If Ruby were a brand new language with no baggage, we may only
have "includes?" instead.  But Ruby has tons of outside
dependencies which already rely on "include?" for several
decades, now.


A similar example: *nix has a similar problem with "creat" and
"O_CREAT".  Introducing "create" and "O_CREATE" as aliases at
this point would only harm compatibility, portability, and
reviewability.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:83150] Re: Alias Enumerable#include? to Enumerable#includes?
  2017-10-06  7:04 ` [ruby-core:83149] " Eric Wong
@ 2017-10-06  7:21   ` Alberto Almagro
  2017-10-06  9:57     ` [ruby-core:83156] " Eric Wong
  0 siblings, 1 reply; 9+ messages in thread
From: Alberto Almagro @ 2017-10-06  7:21 UTC (permalink / raw
  To: Ruby developers


[-- Attachment #1.1: Type: text/plain, Size: 1991 bytes --]

Then we should stop evolving the language because all the new stuff we
could introduce would eventually increase learning,
review, optimization, and implementation costs, right?

2017-10-06 9:04 GMT+02:00 Eric Wong <normalperson@yhbt.net>:

> Alberto Almagro <albertoalmagro@gmail.com> wrote:
> > this was mentioned at Euruko's conference by Bozhidar Batsov and fully
> > resonated with my own personal experience using Ruby. As I tweeted after
> > the conference I would like to contribute to make Ruby better, and
> > aliasing Enumerable#include? with Enumerable#includes? would be a great
> > start. I simply can't remember how many times I have written includes?
> > instead of include? Last Saturday I definitely confirmed that I'm not the
> > only one. What do you think?
>
> Having multiple names for the same thing increases learning,
> review, optimization, and implementation costs.  IMHO, Ruby
> already has too many aliases which make things more difficult
> than they should be; we should not add more aliases.
>
>
> Furthermore, there are many classes outside Enumerable with
> "include?" which would also need "includes?" for consistency if
> your change were accepted.  This also applies to 3rd-party
> libraries like Rack and Rails which subclass core Ruby classes
> or define workalike "include?" methods for databases or
> case-insensitive hashes.
>
> Introducing a second name would be harmful to polymorphic use.
>
> If Ruby were a brand new language with no baggage, we may only
> have "includes?" instead.  But Ruby has tons of outside
> dependencies which already rely on "include?" for several
> decades, now.
>
>
> A similar example: *nix has a similar problem with "creat" and
> "O_CREAT".  Introducing "create" and "O_CREATE" as aliases at
> this point would only harm compatibility, portability, and
> reviewability.
>
> Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
>

[-- Attachment #1.2: Type: text/html, Size: 2951 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]


Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:83153] Re: Alias Enumerable#include? to Enumerable#includes?
  2017-10-06  6:22       ` [ruby-core:83148] " Alberto Almagro
@ 2017-10-06  8:38         ` Martin J. Dürst
  0 siblings, 0 replies; 9+ messages in thread
From: Martin J. Dürst @ 2017-10-06  8:38 UTC (permalink / raw
  To: Ruby developers, Alberto Almagro

On 2017/10/06 15:22, Alberto Almagro wrote:
> Well, Matz told us a the Euruko conference that this wasn’t his language anymore but the community's. He told us, he created it but it was our responsibility as a community to keep it growing and changing. You mentioned before this was requested uncountable times. If a language which claims to be for the programmer's joy isn’t able to simply alias one method requested uncountable times I don’t see how can I justify this better than with uncountable language users votes. Isn’t that far more than enough?

Two points:

- This is probably less of an issue now that we have the
   "did you mean?" gem. It immediately points to # include?
   when using #includes?. There are many other points where
   programming languages are not exactly the same as natural
   languages.

- It's probably not the first time that Matz has said that
   he considers Ruby the community's language. But that doesn't
   mean that every request for additional aliases (and other
   features) will just be integrated. If we did this, we might
   end up with a horrible hodgepodge of a language. So Matz
   won't say: "I don't need it, so it's not needed in Ruby.",
   but that doesn't mean that he will add all requests.

Regards,   Martin.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:83156] Re: Alias Enumerable#include? to Enumerable#includes?
  2017-10-06  7:21   ` [ruby-core:83150] " Alberto Almagro
@ 2017-10-06  9:57     ` Eric Wong
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Wong @ 2017-10-06  9:57 UTC (permalink / raw
  To: ruby-core

Alberto Almagro <albertoalmagro@gmail.com> wrote:
> Then we should stop evolving the language because all the new stuff we
> could introduce would eventually increase learning,
> review, optimization, and implementation costs, right?

We should not evolve until all costs are considered.  Keep in
mind evolution can be in the form of deprecating and removing
redundant or unused features, too.

There's plenty of redundant methods and aliases in Ruby I'd like
to remove to make Ruby leaner; but it's not going to happen
because it will break existing code.  The best we can do is to
prevent more mistakes from entering in the first place.


What you're proposing is akin to wisdom teeth or extra thumbs.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-10-06  9:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 16:11 [ruby-core:83107] Alias Enumerable#include? to Enumerable#includes? Alberto Almagro
2017-10-05  1:25 ` [ruby-core:83113] " Urabe, Shyouhei
2017-10-05 10:59   ` [ruby-core:83129] " Alberto Almagro
2017-10-06  0:50     ` [ruby-core:83138] " Urabe, Shyouhei
2017-10-06  6:22       ` [ruby-core:83148] " Alberto Almagro
2017-10-06  8:38         ` [ruby-core:83153] " Martin J. Dürst
2017-10-06  7:04 ` [ruby-core:83149] " Eric Wong
2017-10-06  7:21   ` [ruby-core:83150] " Alberto Almagro
2017-10-06  9:57     ` [ruby-core:83156] " Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).