From: Alberto Almagro Date: 2017-10-06T09:21:06+02:00 Subject: [ruby-core:83150] Re: Alias Enumerable#include? to Enumerable#includes? --===============2093769406== Content-Type: multipart/alternative; boundary="94eb2c07fd4c5f4ef8055adbb013" --94eb2c07fd4c5f4ef8055adbb013 Content-Type: text/plain; charset="UTF-8" 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 : > Alberto Almagro 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: > > --94eb2c07fd4c5f4ef8055adbb013 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Then we should stop evolving the language because all the = new stuff we could introduce would eventually=C2=A0increase learning,
review, optimization, and implementation costs, righ= t?

20= 17-10-06 9:04 GMT+02:00 Eric Wong <normalperson@yhbt.net>:
Alberto Almagro <<= a href=3D"mailto:albertoalmagro@gmail.com">albertoalmagro@gmail.com>= wrote:
> this was mentioned at Euruko's conference by Bozhidar Batsov and f= ully
> resonated with my own personal experience using Ruby. As I tweeted aft= er
> the conference I would like to contribute to make Ruby better, and
> aliasing Enumerable#include? with Enumerable#includes? would be a grea= t
> start. I simply can't remember how many times I have written inclu= des?
> 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.=C2=A0 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 consis= tency if
your change were accepted.=C2=A0 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.=C2=A0 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".=C2=A0 Introducing "create" and "O_CREAT= E" as aliases at
this point would only harm compatibility, portability, and
reviewability.

--94eb2c07fd4c5f4ef8055adbb013-- --===============2093769406== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Unsubscribe: --===============2093769406==--