# Method search rule in 2.0?

**URL:** <https://rubytalk.org/t/method-search-rule-in-2-0/17534>\
**Category:** ruby-talk\
**Created:** [9 April 2005 09:34 UTC](https://rubytalk.org/t/method-search-rule-in-2-0/17534 "2005-04-09T09:34:53Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Lionel\_Thiry2](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@Lionel\_Thiry2](https://rubytalk.org/u/Lionel_Thiry2)\
**Post date:** [10 April 2005 02:39 UTC](https://rubytalk.org/t/method-search-rule-in-2-0/17534/21 "2005-04-10T02:39:39Z")

</div>

David A. Black a écrit :

> Hi --
> 
> > > [I wrote:]
> 
> > That's different; that's a class method.
> > 
> > In present ruby, yes, C::util is identical to C.util.
> > 
> > But I was thinking of "C::util" as an explicit namespace specification, not as a message sending to C object.
> > 
> > You talked about adding some "#" new operator could be inadequate as it is usually used for comments. I was just indicating "::" could do the job.
> > 
> > > These last two don't really fit the dot semantics, and if they're  
> > > alternatives to C::util, then they're dealing with a class method  
> > > anyway (rather than the issue of limiting the effect of overriding  
> > > instance methods).
> > > 
> > > My suggestion of C#util is based on the common use of # to mean  
> > > "instance method of the named class or module". It wouldn't require  
> > > redefinition of the dot notation, nor overloading 'self' to be a  
> > > boolean flag (as in the original proposal, where 'self' means both  
> > > "the default object" and "don't redirect this to an overridden version  
> > > of the method).
> > 
> > And what is your opinion, now, if you take for granted that "::" semantic is redefined?
> 
> I think it's much too big a change for something like this. It would  
> also lead to huge amounts of code breakage. (I don't use :: for  
> method calls myself, but it's used a fair amount.)

I use it for constants. Does anybody use it for something else?

If not, then only constants would be affected. And the namespace semantic wouldn't change much how things work for constants, don't you think?

Or I am missing some points, somewhere, as usual. 😉

> **···**
>
> > On Sun, 10 Apr 2005, Lionel Thiry wrote:
> 
> --  
> Lionel Thiry

---

<div class="post-metadata">

**Author:** ![David\_A\_Black3](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@David\_A\_Black3](https://rubytalk.org/u/David_A_Black3)\
**Post date:** [10 April 2005 02:58 UTC](https://rubytalk.org/t/method-search-rule-in-2-0/17534/22 "2005-04-10T02:58:59Z")

</div>

Hi --

> > > And what is your opinion, now, if you take for granted that "::" semantic is redefined?
> > 
> > I think it's much too big a change for something like this. It would  
> > also lead to huge amounts of code breakage. (I don't use :: for  
> > method calls myself, but it's used a fair amount.)
> 
> I use it for constants. Does anybody use it for something else?

ruby/1.8$ grep "::[a-z\_]" `find . -name "*.rb"` | wc -l  
&nbsp;&nbsp;&nbsp;&nbsp;1194

🙂

> If not, then only constants would be affected. And the namespace semantic wouldn't change much how things work for constants, don't you think?

I just think it would be awfully confusing.

David

> **···**
>
> On Sun, 10 Apr 2005, Lionel Thiry wrote:
> 
> --  
> David A. Black  
> dblack@wobblini.net

[Previous page](https://rubytalk.org/t/method-search-rule-in-2-0/17534.md?page=1)
