------art_9236_23242444.1208982517934
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wed, Apr 23, 2008 at 9:21 AM, David A. Black <dblack / rubypal.com> wrote:

> Hi --
>
> I'd like to request the deprecation/removal of :: as a synonym for the
> method-calling dot. I think it's a good opportunity to take out
> something that Ruby doesn't need. We've already got the dot, which
> always means "send a message", and :: already means something else
> (constant resolution).


I'd actually prefer to go the other way and  add  more value to both "::"
and ".".

a::b - gives an object named b in the scope of a
a.b - calls an object named b in the scope of a

With this, you'd have these as equivalents:

a::b <a.method(:b)
a.b <a::b.call
a.b(x, y) <a::b.call(x, y)

currying could also naturally come out of this:

a::b(x, y) <a.method(:b).curry(x, y)
a::b(x, y)[z] <a.method(:b).curry(x, y)[z] <a.b

You could think of "a" being an object or a class in the above.  What's in
the scope would just be different.

just my 2 cents...

Eric

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

On Wed, Apr 23, 2008 at 9:21 AM, David A. Black &lt;<a hrefailto:dblack / rubypal.com">dblack / rubypal.com</a>&gt; wrote:<br><div classmail_quote"><blockquote classmail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi --<br>
<br>
I&#39;d like to request the deprecation/removal of :: as a synonym for the<br>
method-calling dot. I think it&#39;s a good opportunity to take out<br>
something that Ruby doesn&#39;t need. We&#39;ve already got the dot, which<br>
always means &quot;send a message&quot;, and :: already means something else<br>
(constant resolution).</blockquote><div><br>I&#39;d actually prefer to go the other way and&nbsp; add&nbsp; more value to  both &quot;::&quot; and &quot;.&quot;.<br><br>a::b - gives an object named b in the scope of a<br>a.b - calls an object named b in the scope of a<br>
<br>With this, you&#39;d have these as equivalents:<br><br>a::b &lt;t; a.method(:b)<br>a.b &lt;t; a::b.call<br>a.b(x, y) &lt;t; a::b.call(x, y)<br><br>currying could also naturally come out of this:<br><br>a::b(x, y) &lt;t; a.method(:b).curry(x, y)<br>
a::b(x, y)[z] &lt;t; a.method(:b).curry(x, y)[z] &lt;t; a.b<br><br>You could think of &quot;a&quot; being an object or a class in the above.&nbsp; What&#39;s in the scope would just be different.<br><br>just my 2 cents...<br>
<br>Eric<br><br></div></div>

------art_9236_23242444.1208982517934--