From: Joel VanderWerf Date: 2009-05-15T01:42:13+09:00 Subject: Re: Syntactic sugar idea Mark Thomas wrote: > This is a neat idea, but wouldn't it conflict with the "fluent > interface" construct? Using Joel's DSL example: > > config "my window" do > .width @x > .height @y > end > > if we changed it to > > config "my window" do > .width calculate_width > .height @y > end > > Now how does the parser know what .height refers to: calculate_width, > or the implicit block variable? Yeah, seems impossible. Maybe if there were some other character instead of "." to signify sending a message to the block's "default object". -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407