From: David King Landrith Date: 2003-04-09T02:08:06+09:00 Subject: Re: Style Question On Tuesday, April 8, 2003, at 12:58 PM, Michael Campbell wrote: > --- Travis Whitton wrote: >> I've looked in the RubyStyleGuide on the Wiki, and I don't see this >> addressed. >> When initializing variables in classes, is it more common to line >> up `=' or just leave them alone? > > I leave them alone. the "lining up" I find just a bit too cutesy, > and if you end up with 1 long name, the rest suffer from too much > whitespace. > > Too, if you ADD something with a long name, you have to go back and > re-adjust the existing ones. > > All this, for negligible readability gains. For me, it's not that lining up the equals makes the initializations themselves easier to read (in that regard, I agree that the improvement is negligible). Rather, I find that it does a good job of making initializations look separate from the rest of the code. And I find that this makes for much easier visual parsing of the code, especially while scrolling. And so I agree that lining up initializations is a bit too cutesy in reasonably short files. In longer files (say 500+ lines), though, I do prefer variable initializations to be lined up. > (All the above IMO, naturally.) Likewise, of course. ------------------------------------------------------- David King Landrith (w) 617.227.4469x213 (h) 617.696.7133 One useless man is a disgrace, two are called a law firm, and three or more become a congress -- John Adams ------------------------------------------------------- public key available upon request