From: Dossy Date: 2002-08-11T09:03:02+09:00 Subject: Re: Ruby Language Q's On 2002.07.30, Justin Johnson wrote: > 2. I like the idea of named method parameters (ala Smalltalk, Objective-C). > There was a discussion elsewhere showing something similar using hash > tables. With a bit of syntactic sugar... :var => 10 could be var: 10 How much syntactic toothpaste and mouthwash would be required to disambiguate: yes = "yes" no = "no" x = nil p x.nil? yes: no Hmm. Not interesting? class Foo def hmm(x) p "hmm" end def hmm?(x) p "hmm?" end def bar p hmm?(yes: 10) p hmm? yes: no p hmm ? yes: no end end foo = Foo.new foo.bar Too much syntactic sugar leads to code cavities. Beware. -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)