From: "David A. Black" Date: 2004-09-28T22:11:39+09:00 Subject: Re: Best name for "this method" ? Hi -- On Tue, 28 Sep 2004, trans. (T. Onoma) wrote: > On Tuesday 28 September 2004 08:12 am, David A. Black wrote: > > Hi -- > > > > On Tue, 28 Sep 2004, trans. (T. Onoma) wrote: > > > h = { a: 1, b: 2 } > > > h.a #=> 1 > > > h.b #=> 2 > > > > > > That would be sweet. And would make the above possible without a new > > > class. I know, method name clash is bad --and there's little one can do > > > to get around it. Perhaps alternate notation? > > > > > > h:a > > > h:b > > > > What's wrong with h[:a] ? > > Blech? No, it's okay. Having to use three chars when one will do is not so > sweet. But not big deal. So I take it back. Alternate is not thought out > and probably blech for other reasons. I know it's tempting to want everything to be compressed, and to use (low) character-count as a measure of success, but compressing things can backfire. They get too compressed :-) For example, I believe your notation would run aground on this: cond ? h : a vs. cond ? h:a : b or cond? h:a:b # what's what here? etc. David -- David A. Black dblack@wobblini.net