From: Michael Fellinger Date: 2007-05-21T00:00:26+09:00 Subject: Re: Parser or Programmer? (was: Re: Why not adopt "Python Style" indentation for Ruby?) On 5/20/07, Dick Davies wrote: > On 20/05/07, Michael Fellinger wrote: > > On 5/20/07, Dick Davies wrote: > > > > And you think replacing do/end with indentation would help? > > > > > > I really can't see how - could you give an example? > > > > > > > Let's try: > > > > describe 'myself' > > it 'should be readable' > > lambda > > @reader.reading > > .should change > > @reader.knowledge > > .by(text.amount) > > > > > > # pretty much impossible, if you ask me :) > > # same in usual ruby now > > > > describe 'myself' do > > it 'should be readable' > > lambda{ @reader.reading }. > > should change{ @reader.knowledge }. > > by(text.amount) > > end > > end > > > > # well? > > The only extra words there are do/end and you could replace them > with {} if they really bothered you. > > If you're saying you personally don't like do/end blocks, then you're > as entitled to that opinion as anyone else, but I don't see this as making > DSLs any more or less comprehensible personally > uh, actually that was an example that i can't interpret the indentation. I do like the idea of supporting indentation, but not within ruby. It's just getting into a mess with method-calls with blocks, manual lambdas and doing methodchains like foo{bar}.duh{x} - it's not really about the braces but about the possibility to write that code in a different syntax at all. If someone is brighter than me, you're welcome to propose alternatives :) > > -- > Rasputin :: Jack of All Trades - Master of Nuns > http://number9.hellooperator.net/ > >