ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: segmented method names
by Rick DeNatale other posts by this author
May 9 2008 5:56AM messages near this date
Re: segmented method names | Re: segmented method names
On Thu, May 8, 2008 at 11:31 PM, Nobuyoshi Nakada <nobu@[...].org>  wrote:
>  Hi,
> 
>  At Thu, 8 May 2008 21:49:06 +0900,
>  Rick DeNatale wrote in [ruby-talk:301103]:
> > And in Ruby 1.9 you can also use the new hash literal syntax in the
> > call so it becomes:
> >
> >    contains_point x: value y: value
> 
>  You forgot a comma between first value and y:.

You are correct of course, thanks.

> > However, the semantics of Ruby keyword/hash option parameters are
> > slightly different from the Smalltalk inspired Objective-C method
> > selectors. In Smalltalk/ObjectiveC   x:y: is a different message and
> > will find a different method than y:x:, whereas Ruby keyword/hash
> > parameters are order independent and aren't involved in resolving a
> > message to a method.
> 
>  And the same selector can duplicate, x:x:x: is valid and
>  differs from x:, but it's impossible with a hash.

Good point.

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/
Thread:
Jan Hegewald
Sandro Paganotti
Rick DeNatale
Nobuyoshi Nakada
Rick DeNatale
Jan Hegewald

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved