------art_179389_29459873.1169607123707
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 1/23/07, Charles Oliver Nutter <charles.nutter / sun.com> wrote:
>
> Evan Phoenix wrote:
> > 1) Because of the current semantics, most ruby programmers treat
> > self.foo the same as foo(). I'm very wary of making functional style
> > behave much differently than normal method call style. It adds another
> > layer and complexity and strangeness that I believe we do not need nor
> > want. In fact, I think that it's a bug that private methods can only be
> > called using functional style. The method dispatch mechanism can easily
> > detect that the receiver of the method is the same all the current self
> > end look for private methods.
>
> I agree here as well. Setting simpler logic for dispatching should be
> the goal, not more complicated logic. Having funcall logic now do more
> complicated dispatch logic than self.call logic will only make a
> confusing situation worse.


I think both are worthwhile goals -- a real private visibility, and
undisturbed "self" calling semantics.  Could it be possible to have "
self.foo" have funcall semantics if caller self?

class C
  def foo
    "f"
  end
  private :foo
  def bar
    self.foo
  end
end
C.new.bar # "f"
C.new.foo # raise private method

/Nick

------art_179389_29459873.1169607123707
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 1/23/07, <b classmail_sendername">Charles Oliver Nutter</b> &lt;<a hrefailto:charles.nutter / sun.com">charles.nutter / sun.com</a>&gt; wrote:<div><span classmail_quote"></span><blockquote classmail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Evan Phoenix wrote:<br>&gt; 1) Because of the current semantics, most ruby programmers treat<br>&gt; self.foo the same as foo(). I&#39;m very wary of making functional style<br>&gt; behave much differently than normal method call style. It adds another
<br>&gt; layer and complexity and strangeness that I believe we do not need nor<br>&gt; want. In fact, I think that it&#39;s a bug that private methods can only be<br>&gt; called using functional style. The method dispatch mechanism can easily
<br>&gt; detect that the receiver of the method is the same all the current self<br>&gt; end look for private methods.<br><br>I agree here as well. Setting simpler logic for dispatching should be<br>the goal, not more complicated logic. Having funcall logic now do more
<br>complicated dispatch logic than self.call logic will only make a<br>confusing situation worse.</blockquote><div><br>I think both are worthwhile goals -- a real private visibility, and undisturbed &quot;self&quot; calling semantics.&nbsp; Could it be possible to have &quot;
self.foo&quot; have funcall semantics if caller self?<br><br>class C<br>&nbsp; def foo<br>&nbsp;&nbsp;&nbsp; &quot;f&quot;<br>&nbsp; end<br>&nbsp; private :foo<br>&nbsp; def bar<br></div>&nbsp;&nbsp;&nbsp; self.foo<br>&nbsp; end<br>end<br>C.new.bar # t; &quot;f&quot;<br>
C.new.foo # t; raise private method<br><br>/Nick<br></div>

------art_179389_29459873.1169607123707--