From: Eleanor McHugh Date: 2009-06-05T01:42:56+09:00 Subject: Re: Pythonic indentation (or: beating a dead horse) On 4 Jun 2009, at 17:30, Caleb Clausen wrote: > On 6/4/09, Eleanor McHugh wrote: >> On 4 Jun 2009, at 02:10, Caleb Clausen wrote: >>> So why metaprogramming, particularly? Ahhh, is it because code >>> generators may not take care to indent their generated code >>> properly? >>> I know I've written code generators that do that... >> >> Precisely. >> >> We use code generation so often in mainstream Ruby code - and >> sometimes in some pretty arcane ways - that the possibility of >> introducing a whole new category of defect into the process concerns >> me much more than typing 'end' ever could. > > OTOH, as I am a macro bigot myself, I'd have to argue the position > that generating a bunch or ruby code to be passed to eval is the wrong > way to go about it; equivalent macros should be used instead.... ;) And I wouldn't disagree with you :) Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason