From: Logan Capaldo Date: 2006-09-11T11:52:37+09:00 Subject: Re: Struggling with Blocks On Mon, Sep 11, 2006 at 11:35:28AM +0900, Paul Lutus wrote: > Logan Capaldo wrote: > > / ... > > > Excellent argument, poor choice of example code *cough*. > > Hmm? > > > a = 1 #=> 1 > > a << 1 #=> 2 > > $stdout << 4 # outputs '4' > > Yes, as does the iostream 'x' in my example (y = x << 4), and y is set to > "true" unless the operation fails. Remember, the example is C++, not Ruby, > solely to point out a language ambiguity there. > Entirely my point, the exact same ambiguity exists in ruby. Why can't be also have the do ... end ambiguity since we've already introduced ambiguities. Ruby is full ambiguities (some might suggest that's what makes Duck-typing such a useful paradigm). My point was that saying "Ruby shouldn't have an ambiguity, look at this ambiguity in this other language", when ruby has the exact same ambiguity is sort of counter productive.