From: Dr Balwinder S Dheeman Date: 2005-05-28T10:15:20+09:00 Subject: Re: [FYKA] Plz comment Thomas Kirchner wrote: > * On May 27 23:45, Dr Balwinder S Dheeman (ruby-talk@ruby-lang.org) wrote: > >>Whichever of above appeals you better? Or do any of you have better >>ideas on these? What would you expact more from such a utility? >>Feedback of yours shall highly be appreciated. > > > Personally, I prefer either matz's way or your third way (where the > things inside the block are at the same indentation level). To me, > that's important in clarifying the block. It lets you know that all > elements at this indentation level are of the same structure, whether > it's a block, case, if, etc. If you have the "else" further left than > the "rescue", or similar, my eyes would naturally ignore the rescue as > part of that semantic block. > > Also, I'll be interested in seeing how your project comes along. Ruby is > naturally beautiful, but I have a tendency to write compact (ugly) code. > I think it'd be hard for a utility to beautify code that is ugly not > because of its spacing but because of the > (compact/ugly/archaic/compressed) style used. You know me too am a newbie to Ruby as yet, that's why one in while I look at Ruby code which others have written. I saw a lot of inconsistancy in placing commas, spaces and tabs (even if most of the editors now a days come with syntax highlighting and other such features) people ignore and, or skip over while concentarting on the real target. I would prefer keeping the code as compact as possible > Just as a simple example - would it turn C-style (if x ? yes : no) into > longer if/else blocks? Things like this are "ugly" because of the > concept used, not its placement in the text. Of course, it's possible to > just ignore things like this and beautify the things you're sure about. I shall try making the 'rindent' as configurable as possible. -- Dr Balwinder Singh Dheeman Registered Linux User: #229709 CLLO (Chief Linux Learning Officer) Machines: #168573, 170593, 259192 Anu's Linux@HOME Distros: Ubuntu, Fedora, Knoppix More: http://anu.homelinux.net/~bsd/ Visit: http://counter.li.org/