From: "trans. (T. Onoma)" Date: 2004-09-29T06:17:34+09:00 Subject: Re: Best name for "this method" ? On Tuesday 28 September 2004 05:44 am, Gavin Sinclair wrote: >   foo.methods[:new, :protected]   # if you need combination This line's got me thinking... How does one define a class [] constructor? For example Hash can be use like this: Hash[:a=>1,:b=>2 ] And then I start to wonder why we can't just use the class name like a method? Hash(:a=>1, :b=>2) Of course, I also think the same of Procs themselves, and having to use call (or []): myproc = proc{2+2} myproc() #=> 4 The potential name clashes don't seem a big enough blooper to me, but perhaps I have forgotten another reason. Anyway, once again I digress. My original point was simply this: Would it behoove us to extend the [] construct on hashes to accept multiple parameters? E.g. h = { :a => 1, :b => 2, :c => 2 } h[:a, :c] #=> [1,2] This would make Gavin's above method notation nicely workable without a special class. T. -- ( o _ カラチ // trans. / \ transami@runbox.com I don't give a damn for a man that can only spell a word one way. -Mark Twain