ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1
@ 2013-05-07 10:49 charliesome (Charlie Somerville)
  2013-05-07 18:35 ` [ruby-core:54853] [ruby-trunk - Feature #8377] " Hanmac (Hans Mackowiak)
                   ` (20 more replies)
  0 siblings, 21 replies; 27+ messages in thread
From: charliesome (Charlie Somerville) @ 2013-05-07 10:49 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been reported by charliesome (Charlie Somerville).

----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54853] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
@ 2013-05-07 18:35 ` Hanmac (Hans Mackowiak)
  2013-05-07 23:37   ` [ruby-core:54855] " Charlie Somerville
  2013-05-07 20:03 ` [ruby-core:54854] " Eregon (Benoit Daloze)
                   ` (19 subsequent siblings)
  20 siblings, 1 reply; 27+ messages in thread
From: Hanmac (Hans Mackowiak) @ 2013-05-07 18:35 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by Hanmac (Hans Mackowiak).


i am against that, what about methods that are defined in Kernel, but you want when you are inside an BasicObject?
you need something like:
  Kernel::Array([])
or
  Kernel.Array([])
what does make more sense for you?
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39183

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54854] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
  2013-05-07 18:35 ` [ruby-core:54853] [ruby-trunk - Feature #8377] " Hanmac (Hans Mackowiak)
@ 2013-05-07 20:03 ` Eregon (Benoit Daloze)
  2013-05-07 23:56 ` [ruby-core:54856] " henry.maddocks (Henry Maddocks)
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: Eregon (Benoit Daloze) @ 2013-05-07 20:03 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by Eregon (Benoit Daloze).


Hanmac (Hans Mackowiak) wrote:
> i am against that, what about methods that are defined in Kernel, but you want when you are inside an BasicObject?
> you need something like:
>   Kernel::Array([])
> or
>   Kernel.Array([])
> what does make more sense for you?

You need :: before Kernel, unless you define const_get
    ::Kernel::Array(3)
And in that case I much prefer
    ::Kernel.Array(3)
even if it does not look as nice because at least is is clear :: is constant resolution.

This is a weird case due to the upper case first letter, what do you think about:
    ::Kernel::puts "Hello"
versus
    ::Kernel.puts "Hello"
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39184

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54855] Re: [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 18:35 ` [ruby-core:54853] [ruby-trunk - Feature #8377] " Hanmac (Hans Mackowiak)
@ 2013-05-07 23:37   ` Charlie Somerville
  0 siblings, 0 replies; 27+ messages in thread
From: Charlie Somerville @ 2013-05-07 23:37 UTC (permalink / raw
  To: ruby-core

[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

On Wednesday, 8 May 2013 at 4:35 AM, Hanmac (Hans Mackowiak) wrote:
> i am against that, what about methods that are defined in Kernel, but you want when you are inside an BasicObject?
> you need something like:
> Kernel::Array([])
> or
> Kernel.Array([])
> what does make more sense for you?

I actually prefer the '::Kernel.Array' example here (although I can see both sides of the argument), just because it makes it perfectly obvious that 'Array' is actually a method call and not something else.

On Wednesday, 8 May 2013 at 6:03 AM, Eregon (Benoit Daloze) wrote:

> This is a weird case due to the upper case first letter, what do you think about:
> ::Kernel::puts "Hello"
> versus
> ::Kernel.puts "Hello"

I definitely think '::Kernel.puts' is better here.



[-- Attachment #2: Type: text/html, Size: 1234 bytes --]

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

* [ruby-core:54856] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
  2013-05-07 18:35 ` [ruby-core:54853] [ruby-trunk - Feature #8377] " Hanmac (Hans Mackowiak)
  2013-05-07 20:03 ` [ruby-core:54854] " Eregon (Benoit Daloze)
@ 2013-05-07 23:56 ` henry.maddocks (Henry Maddocks)
  2013-05-08  0:57 ` [ruby-core:54857] " boris_stitnicky (Boris Stitnicky)
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: henry.maddocks (Henry Maddocks) @ 2013-05-07 23:56 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by henry.maddocks (Henry Maddocks).


charliesome (Charlie Somerville) wrote:
> (({::})) is usually a constant lookup operator, but it can also be used to call methods. 

Is it? I thought it was the scope resolution operator.

charliesome (Charlie Somerville) wrote:
> This can confusing to people learning Ruby.

It depends what language you're coming from.


----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39186

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54857] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (2 preceding siblings ...)
  2013-05-07 23:56 ` [ruby-core:54856] " henry.maddocks (Henry Maddocks)
@ 2013-05-08  0:57 ` boris_stitnicky (Boris Stitnicky)
  2013-05-08  2:55 ` [ruby-core:54858] " phluid61 (Matthew Kerwin)
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: boris_stitnicky (Boris Stitnicky) @ 2013-05-08  0:57 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by boris_stitnicky (Boris Stitnicky).


+1
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39187

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54858] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (3 preceding siblings ...)
  2013-05-08  0:57 ` [ruby-core:54857] " boris_stitnicky (Boris Stitnicky)
@ 2013-05-08  2:55 ` phluid61 (Matthew Kerwin)
  2013-05-08  9:17 ` [ruby-core:54863] Re: [ruby-trunk - Feature #8377][Open] " Yorick Peterse
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: phluid61 (Matthew Kerwin) @ 2013-05-08  2:55 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by phluid61 (Matthew Kerwin).


=begin
henry.maddocks (Henry Maddocks) wrote:

 > charliesome (Charlie Somerville) wrote:
 > > (({::})) is usually a constant lookup operator, but it can also be
 > > used to call methods. 
 > 
 > Is it? I thought it was the scope resolution operator.

While I know better, my gut instinct is always to agree; and that, by contrast, (({.})) is for the receiver of a method.  For example:

   
  ::Kernel::Array(3)
  #=> in global namespace,
  #     in nested namespace 'Kernel',
  #       invoke method 'Array' with no receiver
  # perlish: @::Kernel::Array(3)

  ::Kernel.Array(3)
  #=> in global namespace,
  #     in nested namespace 'Kernel',
  #       invoke method 'Array' with 'Kernel' as receiver
  # perlish: @::Kernel->Array(3), or @::Kernel::Array(::Kernel,3)

However I know that's not the case; and in fact (({::})) means different things if the right-hand parameter thingy is a constant or function.  I.e. (({obj.foo})) ~ (({obj::foo()})) ~ (({obj::foo})), but (({obj.FOO})) ~ (({obj::FOO()})) ≁ (({obj::FOO})), irrespective of ((|obj|)) being a Class or not.

The whole thing would be made much more clear if (({::FOO()})) and (({::foo})) were removed, and (({::})) was always only used to resolve constants.

 > charliesome (Charlie Somerville) wrote:
 > > This can confusing to people learning Ruby.
 > 
 > It depends what language you're coming from.

Unless you're coming from Ruby, I'm pretty sure it's confusing for everyone.

=end
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39188

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54863] Re: [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (4 preceding siblings ...)
  2013-05-08  2:55 ` [ruby-core:54858] " phluid61 (Matthew Kerwin)
@ 2013-05-08  9:17 ` Yorick Peterse
  2013-05-08 14:42 ` [ruby-core:54868] [ruby-trunk - Feature #8377] " dgutov (Dmitry Gutov)
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: Yorick Peterse @ 2013-05-08  9:17 UTC (permalink / raw
  To: ruby-core

I'm in favour of deprecating `::` for method calls as well. I'm all for
"multiple roads to Rome" but when it comes to the method calling syntax
I really want it to be consistent.

Actually getting rid of the operator is going to be interesting though
since I believe it's used in various places of MRI's core/std library as
well as third-party projects. This is probably something that shouldn't
be removed until at least 2.2.

Yorick

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

* [ruby-core:54868] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (5 preceding siblings ...)
  2013-05-08  9:17 ` [ruby-core:54863] Re: [ruby-trunk - Feature #8377][Open] " Yorick Peterse
@ 2013-05-08 14:42 ` dgutov (Dmitry Gutov)
  2013-05-08 19:13 ` [ruby-core:54871] " rubiii (Daniel Harrington)
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: dgutov (Dmitry Gutov) @ 2013-05-08 14:42 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by dgutov (Dmitry Gutov).


+1

"::" method call syntax has no advantages over ".", and it should be relatively simple to search through any codebase and convert the instances of using the former into the latter automatically.
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39203

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54870] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (7 preceding siblings ...)
  2013-05-08 19:13 ` [ruby-core:54871] " rubiii (Daniel Harrington)
@ 2013-05-08 19:13 ` bozhidar (Bozhidar Batsov)
  2013-05-09  8:35 ` [ruby-core:54875] " henry.maddocks (Henry Maddocks)
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: bozhidar (Bozhidar Batsov) @ 2013-05-08 19:13 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by bozhidar (Bozhidar Batsov).


+1

Apart from having no advantages over ".", "::" for method calls is very rarely used even anyways. It has been effectively deprecated by the Ruby community and it now has to be deprecated by Ruby itself :-)
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39209

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54871] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (6 preceding siblings ...)
  2013-05-08 14:42 ` [ruby-core:54868] [ruby-trunk - Feature #8377] " dgutov (Dmitry Gutov)
@ 2013-05-08 19:13 ` rubiii (Daniel Harrington)
  2013-05-08 19:13 ` [ruby-core:54870] " bozhidar (Bozhidar Batsov)
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: rubiii (Daniel Harrington) @ 2013-05-08 19:13 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by rubiii (Daniel Harrington).


I'm also very much in favour of this change for simplicity.

When I learned about Nokogiri, I had no idea how this was supposed to work: Nokogiri::XML('<xml/>')
Simply changing the code to use a '.' instead of '::' makes it clear, that we're sending the '.XML' message.
So why not encourage people to write code that is easier to read?!

----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39210

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54875] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (8 preceding siblings ...)
  2013-05-08 19:13 ` [ruby-core:54870] " bozhidar (Bozhidar Batsov)
@ 2013-05-09  8:35 ` henry.maddocks (Henry Maddocks)
  2013-05-09  8:53   ` [ruby-core:54877] " Yorick Peterse
  2013-05-09  8:54 ` [ruby-core:54878] " henry.maddocks (Henry Maddocks)
                   ` (10 subsequent siblings)
  20 siblings, 1 reply; 27+ messages in thread
From: henry.maddocks (Henry Maddocks) @ 2013-05-09  8:35 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by henry.maddocks (Henry Maddocks).


phluid61 (Matthew Kerwin) wrote:
> =begin
> henry.maddocks (Henry Maddocks) wrote:
> 
>  > charliesome (Charlie Somerville) wrote:
>  > It depends what language you're coming from.
> 
> Unless you're coming from Ruby, I'm pretty sure it's confusing for everyone.
> 
> =end

C++ and PHP also use the scope resolution operator.

As for the rest of what you said, I don't understand.


----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39215

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54877] Re: [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-09  8:35 ` [ruby-core:54875] " henry.maddocks (Henry Maddocks)
@ 2013-05-09  8:53   ` Yorick Peterse
  0 siblings, 0 replies; 27+ messages in thread
From: Yorick Peterse @ 2013-05-09  8:53 UTC (permalink / raw
  To: ruby-core

Although in PHP you can also abuse the `::` for both static and non
static method calls it's actually not used for namespaces (unlike Ruby),
instead it uses backslashes for that. Although this means that there's
still two ways to call a method (syntax wise) you at least don't end up
using a syntax feature meant for something completely unrelated to
method calls.

PHP is also a terrible language so I don't think it's worth comparing to
at all.

Yorick

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

* [ruby-core:54878] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (9 preceding siblings ...)
  2013-05-09  8:35 ` [ruby-core:54875] " henry.maddocks (Henry Maddocks)
@ 2013-05-09  8:54 ` henry.maddocks (Henry Maddocks)
  2013-05-09  9:52 ` [ruby-core:54880] " charliesome (Charlie Somerville)
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: henry.maddocks (Henry Maddocks) @ 2013-05-09  8:54 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by henry.maddocks (Henry Maddocks).


rubiii (Daniel Harrington) wrote:
> I'm also very much in favour of this change for simplicity.
> 
> When I learned about Nokogiri, I had no idea how this was supposed to work: Nokogiri::XML('<xml/>')
> Simply changing the code to use a '.' instead of '::' makes it clear, that we're sending the '.XML' message.
> So why not encourage people to write code that is easier to read?!

But '.' and '::' mean different things. 
 '::' means you are calling the method that is defined inside the Nokogiri module/namespace. Changing it to use a dot means that you are sending a message to the object Nokogiri.

----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39216

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54880] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (10 preceding siblings ...)
  2013-05-09  8:54 ` [ruby-core:54878] " henry.maddocks (Henry Maddocks)
@ 2013-05-09  9:52 ` charliesome (Charlie Somerville)
  2013-05-09 13:13 ` [ruby-core:54883] " matz (Yukihiro Matsumoto)
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: charliesome (Charlie Somerville) @ 2013-05-09  9:52 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by charliesome (Charlie Somerville).


henry.maddocks (Henry Maddocks) wrote:
> But '.' and '::' mean different things. 
>  '::' means you are calling the method that is defined inside the Nokogiri module/namespace. Changing it to use a dot means that you are sending a message to the object Nokogiri.

This isn't correct. Nokogiri.XML() and Nokogiri::XML() are equivalent.
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39219

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54883] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (11 preceding siblings ...)
  2013-05-09  9:52 ` [ruby-core:54880] " charliesome (Charlie Somerville)
@ 2013-05-09 13:13 ` matz (Yukihiro Matsumoto)
  2013-05-09 14:11 ` [ruby-core:54886] " dgutov (Dmitry Gutov)
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: matz (Yukihiro Matsumoto) @ 2013-05-09 13:13 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by matz (Yukihiro Matsumoto).


* we haven't reached consensus to remove double colons for method calls from the language.
* even if we do, 2.2 is not the right time to remove, maybe 3.0.
* we have convention of Array class and Array(obj) conversion method, why not Foo::Bar and Foo::Bar(obj)?

Matz.

----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39221

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54886] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (12 preceding siblings ...)
  2013-05-09 13:13 ` [ruby-core:54883] " matz (Yukihiro Matsumoto)
@ 2013-05-09 14:11 ` dgutov (Dmitry Gutov)
  2013-05-09 15:50 ` [ruby-core:54890] " headius (Charles Nutter)
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: dgutov (Dmitry Gutov) @ 2013-05-09 14:11 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by dgutov (Dmitry Gutov).


> we haven't reached consensus to remove double colons for method calls from the language.

That's what this issue is about, isn't it?

> even if we do, 2.2 is not the right time to remove, maybe 3.0.

I agree. But deprecating it would already be beneficial.

> we have convention of Array class and Array(obj) conversion method, why not Foo::Bar and Foo::Bar(obj)?

Foo.Bar(obj) is much better. Writing it another way makes it confusing for a human reader, like it's somehow a special, callable class.
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39224

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54890] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (13 preceding siblings ...)
  2013-05-09 14:11 ` [ruby-core:54886] " dgutov (Dmitry Gutov)
@ 2013-05-09 15:50 ` headius (Charles Nutter)
  2013-05-09 16:22 ` [ruby-core:54891] " jeremyevans0 (Jeremy Evans)
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: headius (Charles Nutter) @ 2013-05-09 15:50 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by headius (Charles Nutter).


More cases of ambiguity:

obj::FOO is always a constant lookup. obj::FOO() is always a method call.

obj::foo is always a method call. There's no way to omit parens for a :: call if the method name is capitalized.

I support removal as well. It doesn't add anything and it confuses more often than not.
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39229

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54891] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (14 preceding siblings ...)
  2013-05-09 15:50 ` [ruby-core:54890] " headius (Charles Nutter)
@ 2013-05-09 16:22 ` jeremyevans0 (Jeremy Evans)
  2013-05-09 16:33 ` [ruby-core:54893] " alexeymuranov (Alexey Muranov)
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: jeremyevans0 (Jeremy Evans) @ 2013-05-09 16:22 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by jeremyevans0 (Jeremy Evans).


headius (Charles Nutter) wrote:
> More cases of ambiguity:
> 
> obj::FOO is always a constant lookup. obj::FOO() is always a method call.
> 
> obj::foo is always a method call. There's no way to omit parens for a :: call if the method name is capitalized.

`obj::FOO 1` is a method call.  You don't even need parens for a capitalized method that takes no arguments if you get creative: `obj::FOO *[]` :)


----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39230

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54893] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (15 preceding siblings ...)
  2013-05-09 16:22 ` [ruby-core:54891] " jeremyevans0 (Jeremy Evans)
@ 2013-05-09 16:33 ` alexeymuranov (Alexey Muranov)
  2013-05-11 15:12 ` [ruby-core:54913] " jballanc (Joshua Ballanco)
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: alexeymuranov (Alexey Muranov) @ 2013-05-09 16:33 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by alexeymuranov (Alexey Muranov).


This is related and has not yet been rejected: #6806
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39232

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54913] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (16 preceding siblings ...)
  2013-05-09 16:33 ` [ruby-core:54893] " alexeymuranov (Alexey Muranov)
@ 2013-05-11 15:12 ` jballanc (Joshua Ballanco)
  2013-05-11 17:11 ` [ruby-core:54915] " jeremyevans0 (Jeremy Evans)
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 27+ messages in thread
From: jballanc (Joshua Ballanco) @ 2013-05-11 15:12 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by jballanc (Joshua Ballanco).


=begin
I'm not sure how I feel about this. I understand the potential for confusion, but at the same time there's a certain congruity of being able to inherit from classes or methods that create classes in the same way. For example:

    module Foo
      class Bar
        def say
          "Hello from Bar!"
        end
      end
    
      def self.Bar(greeting)
        klass = Class.new
        klass.class_eval <<-END
          def say
            "#{greeting} from parameterized Bar!"
          end
        END
        klass
      end
    end
    
    class Baz < Foo::Bar
      def shout
        say.upcase
      end
    end
    
    class Quux < Foo::Bar("Howdy")
      def shout
        say.upcase
      end
    end
    
    puts Baz.new.shout
    puts Quux.new.shout

If we remove the ability to call methods with (({::})), then the class definition lines don't match as nicely:

    class Baz < Foo::Bar
    ...
    class Quux < Foo.Bar("Howdy")
    ...

Though I'd be interested to hear Mr. Evans opinion, since I think Sequel is where I've seen this used to the greatest effect...
=end

----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39252

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54915] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (17 preceding siblings ...)
  2013-05-11 15:12 ` [ruby-core:54913] " jballanc (Joshua Ballanco)
@ 2013-05-11 17:11 ` jeremyevans0 (Jeremy Evans)
  2013-05-13 19:01   ` [ruby-core:54970] " Magnus Holm
  2013-06-02  7:12 ` [ruby-core:55242] " zzak (Zachary Scott)
  2013-08-11  4:46 ` [ruby-core:56538] [ruby-trunk - Feature #8377][Rejected] " tenderlovemaking (Aaron Patterson)
  20 siblings, 1 reply; 27+ messages in thread
From: jeremyevans0 (Jeremy Evans) @ 2013-05-11 17:11 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by jeremyevans0 (Jeremy Evans).


jballanc (Joshua Ballanco) wrote:
> If we remove the ability to call methods with (({::})), then the class definition lines don't match as nicely:
> 
>     class Baz < Foo::Bar
>     ...
>     class Quux < Foo.Bar("Howdy")
>     ...
> 
> Though I'd be interested to hear Mr. Evans opinion, since I think Sequel is where I've seen this used to the greatest effect...

I'm against removing it, since I think there are places where the syntax looks nicer with :: (constructors such as Sequel::Model() and Nokogiri::XML()).  Having only one way to do something for its own sake is not the ruby way, and I think the loss of backwards compatibility and nicer syntax outweighs the reduced confusion.  I don't train new ruby programmers, though, so maybe I underestimate the confusion this causes.
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39253

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:54970] Re: [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-11 17:11 ` [ruby-core:54915] " jeremyevans0 (Jeremy Evans)
@ 2013-05-13 19:01   ` Magnus Holm
  2013-05-13 20:49     ` [ruby-core:54972] " Joel VanderWerf
  2013-05-13 22:11     ` [ruby-core:54973] " Jeremy Evans
  0 siblings, 2 replies; 27+ messages in thread
From: Magnus Holm @ 2013-05-13 19:01 UTC (permalink / raw
  To: ruby-core

[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]

On Sat, May 11, 2013 at 7:11 PM, jeremyevans0 (Jeremy Evans) <
merch-redmine@jeremyevans.net> wrote:

>
> Issue #8377 has been updated by jeremyevans0 (Jeremy Evans).
>
>
> jballanc (Joshua Ballanco) wrote:
> > If we remove the ability to call methods with (({::})), then the class
> definition lines don't match as nicely:
> >
> >     class Baz < Foo::Bar
> >     ...
> >     class Quux < Foo.Bar("Howdy")
> >     ...
> >
> > Though I'd be interested to hear Mr. Evans opinion, since I think Sequel
> is where I've seen this used to the greatest effect...
>
> I'm against removing it, since I think there are places where the syntax
> looks nicer with :: (constructors such as Sequel::Model() and
> Nokogiri::XML()).  Having only one way to do something for its own sake is
> not the ruby way, and I think the loss of backwards compatibility and nicer
> syntax outweighs the reduced confusion.  I don't train new ruby
> programmers, though, so maybe I underestimate the confusion this causes.


Can't you use use #[] for this?

  class Quuz < Foo::Bar["Howdy"]
  end

  class User < Sequel::Model[:User]
  end

  doc = Nokogiri::XML[data]

[-- Attachment #2: Type: text/html, Size: 1766 bytes --]

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

* [ruby-core:54972] Re: [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-13 19:01   ` [ruby-core:54970] " Magnus Holm
@ 2013-05-13 20:49     ` Joel VanderWerf
  2013-05-13 22:11     ` [ruby-core:54973] " Jeremy Evans
  1 sibling, 0 replies; 27+ messages in thread
From: Joel VanderWerf @ 2013-05-13 20:49 UTC (permalink / raw
  To: ruby-core

On 05/13/2013 12:01 PM, Magnus Holm wrote:
...
>     jballanc (Joshua Ballanco) wrote:
>      > If we remove the ability to call methods with (({::})), then the
>     class definition lines don't match as nicely:
>      >
>      >     class Baz < Foo::Bar
>      >     ...
>      >     class Quux < Foo.Bar("Howdy")
>      >     ...
>      >
...
> Can't you use use #[] for this?
>
>    class Quuz < Foo::Bar["Howdy"]
>    end
>
>    class User < Sequel::Model[:User]
>    end
>
>    doc = Nokogiri::XML[data]

As a bonus, the use of #[] (a method called on an object), rather than 
function call syntax, is more flexible. Compare:

   module Foo
     module Bar
       class Howdy; end
       def self.[] str
         const_get str
       end
     end
     def self.Bar str
       Bar.const_get str
     end
   end

   fubar = Foo::Bar
   class Quuz < fubar["Howdy"] # decoupled from assignment to fubar
   end
   p Quuz.ancestors[1] # ==> Foo::Bar::Howdy

   class Quuz2 < Foo::Bar("Howdy")
   end
   p Quuz2.ancestors[1] # ==> Foo::Bar::Howdy

You could of course do

   fubar = Foo.method(:Bar)
   class Quuz2 < fubar.call("Howdy")
     ...

but then fubar is just a callable, not a module.

Also note the cleaner (IMHO) encapsulation in Bar when using #[].

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

* [ruby-core:54973] Re: [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-13 19:01   ` [ruby-core:54970] " Magnus Holm
  2013-05-13 20:49     ` [ruby-core:54972] " Joel VanderWerf
@ 2013-05-13 22:11     ` Jeremy Evans
  1 sibling, 0 replies; 27+ messages in thread
From: Jeremy Evans @ 2013-05-13 22:11 UTC (permalink / raw
  To: ruby-core

On 05/14 04:01, Magnus Holm wrote:
> On Sat, May 11, 2013 at 7:11 PM, jeremyevans0 (Jeremy Evans) <
> > I'm against removing it, since I think there are places where the syntax
> > looks nicer with :: (constructors such as Sequel::Model() and
> > Nokogiri::XML()).  Having only one way to do something for its own sake is
> > not the ruby way, and I think the loss of backwards compatibility and nicer
> > syntax outweighs the reduced confusion.  I don't train new ruby
> > programmers, though, so maybe I underestimate the confusion this causes.
> 
> Can't you use use #[] for this?
> 
>   class Quuz < Foo::Bar["Howdy"]
>   end
> 
>   class User < Sequel::Model[:User]
>   end
> 
>   doc = Nokogiri::XML[data]

In the case of Sequel::Model, no, since Sequel::Model.[] is already
defined and does something different than creating a subclass.

Usage of [] for constructors seems fairly uncommon (Hash.[] is the
exception that comes to mind), so from a syntax level it is more likely
to be confusing.  Using capitalized methods for constructors is much
more common in ruby (e.g. Kernel::{String,Array,Integer,Float,...}).

Jeremy

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

* [ruby-core:55242] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (18 preceding siblings ...)
  2013-05-11 17:11 ` [ruby-core:54915] " jeremyevans0 (Jeremy Evans)
@ 2013-06-02  7:12 ` zzak (Zachary Scott)
  2013-08-11  4:46 ` [ruby-core:56538] [ruby-trunk - Feature #8377][Rejected] " tenderlovemaking (Aaron Patterson)
  20 siblings, 0 replies; 27+ messages in thread
From: zzak (Zachary Scott) @ 2013-06-02  7:12 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by zzak (Zachary Scott).

Target version changed from current: 2.1.0 to Next Major

See [ruby-core:54883]
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-39634

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: Next Major


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

* [ruby-core:56538] [ruby-trunk - Feature #8377][Rejected] Deprecate :: for method calls in 2.1
  2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
                   ` (19 preceding siblings ...)
  2013-06-02  7:12 ` [ruby-core:55242] " zzak (Zachary Scott)
@ 2013-08-11  4:46 ` tenderlovemaking (Aaron Patterson)
  20 siblings, 0 replies; 27+ messages in thread
From: tenderlovemaking (Aaron Patterson) @ 2013-08-11  4:46 UTC (permalink / raw
  To: ruby-core


Issue #8377 has been updated by tenderlovemaking (Aaron Patterson).

Status changed from Open to Rejected

Hi,

Matz rejected this here:

  https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130809#Deprecate-for-method-calls-8377

So I'm closing this.  :-)
----------------------------------------
Feature #8377: Deprecate :: for method calls in 2.1
https://bugs.ruby-lang.org/issues/8377#change-41081

Author: charliesome (Charlie Somerville)
Status: Rejected
Priority: Normal
Assignee: 
Category: 
Target version: Next Major


=begin
(({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby.

I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1).

As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled.
=end


-- 
http://bugs.ruby-lang.org/

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

end of thread, other threads:[~2013-08-11  5:15 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 10:49 [ruby-core:54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 charliesome (Charlie Somerville)
2013-05-07 18:35 ` [ruby-core:54853] [ruby-trunk - Feature #8377] " Hanmac (Hans Mackowiak)
2013-05-07 23:37   ` [ruby-core:54855] " Charlie Somerville
2013-05-07 20:03 ` [ruby-core:54854] " Eregon (Benoit Daloze)
2013-05-07 23:56 ` [ruby-core:54856] " henry.maddocks (Henry Maddocks)
2013-05-08  0:57 ` [ruby-core:54857] " boris_stitnicky (Boris Stitnicky)
2013-05-08  2:55 ` [ruby-core:54858] " phluid61 (Matthew Kerwin)
2013-05-08  9:17 ` [ruby-core:54863] Re: [ruby-trunk - Feature #8377][Open] " Yorick Peterse
2013-05-08 14:42 ` [ruby-core:54868] [ruby-trunk - Feature #8377] " dgutov (Dmitry Gutov)
2013-05-08 19:13 ` [ruby-core:54871] " rubiii (Daniel Harrington)
2013-05-08 19:13 ` [ruby-core:54870] " bozhidar (Bozhidar Batsov)
2013-05-09  8:35 ` [ruby-core:54875] " henry.maddocks (Henry Maddocks)
2013-05-09  8:53   ` [ruby-core:54877] " Yorick Peterse
2013-05-09  8:54 ` [ruby-core:54878] " henry.maddocks (Henry Maddocks)
2013-05-09  9:52 ` [ruby-core:54880] " charliesome (Charlie Somerville)
2013-05-09 13:13 ` [ruby-core:54883] " matz (Yukihiro Matsumoto)
2013-05-09 14:11 ` [ruby-core:54886] " dgutov (Dmitry Gutov)
2013-05-09 15:50 ` [ruby-core:54890] " headius (Charles Nutter)
2013-05-09 16:22 ` [ruby-core:54891] " jeremyevans0 (Jeremy Evans)
2013-05-09 16:33 ` [ruby-core:54893] " alexeymuranov (Alexey Muranov)
2013-05-11 15:12 ` [ruby-core:54913] " jballanc (Joshua Ballanco)
2013-05-11 17:11 ` [ruby-core:54915] " jeremyevans0 (Jeremy Evans)
2013-05-13 19:01   ` [ruby-core:54970] " Magnus Holm
2013-05-13 20:49     ` [ruby-core:54972] " Joel VanderWerf
2013-05-13 22:11     ` [ruby-core:54973] " Jeremy Evans
2013-06-02  7:12 ` [ruby-core:55242] " zzak (Zachary Scott)
2013-08-11  4:46 ` [ruby-core:56538] [ruby-trunk - Feature #8377][Rejected] " tenderlovemaking (Aaron Patterson)

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).