From: Trans Date: 2006-09-30T01:05:13+09:00 Subject: Re: New magical version of Symbol.to_proc dblack@wobblini.net wrote: > Hi -- > > On Fri, 29 Sep 2006, Dr Nic wrote: > > > Trans wrote: > >> But as I suggest, > >> if we see it for what it really is --an adapter, then it makes perfect > >> sense, and doesn;t seem so magical after all (except that it still > >> offers some nicely terse syntax). > > > > I agree - it is very nice syntax. > > The ship has clearly sailed on the magic dot, but for the record let > me explain what I don't like about it. > > My problem with something like this: > > x.should.be.equal.to(y) I agree. Unless #should, #be and #equal are all creating some truly useful and generally applicable adaptation then this is just "fluff code". Again overhead is being added for no appreciable gain. Of course, I making an assumption here since I haven't looked at the code , but I suspect that a magic dot notation like: x.should_be.equal_to(y) is more appropriate. In this case it is easy to see that #should_be is an assertion adapter. This is interesting, b/c when you break it down like this one could actaully go a bit further and create more natural ruby constructs: x.should == y T.