From: Dave Thomas Date: 2001-11-30T06:22:23+09:00 Subject: [ruby-talk:26964] Re: short article draft for review Tobias Reif writes: > Dave Thomas wrote: > > > print " > > " > > > > is really quite bad... > > Why? I can't see a disadvantage. 1. Move the file between Unix and Windows boxes: what happens to the literal newline? Is that what you wanted to happen? 2. It's obscure: print " " Could look like print '' with some spurious stuff on the next line. The newline character effectively disappears from listings and in editors, so your readers will have to take extra effort to work out what's going on. It's like me writing a = % exit To set 'a' to the string "exit". It works, but it takes a while to work out why. 3. Are you trying to communicate with your code? If so, why confuse the reader with non-idiomatic structures. I've never seen _any_ code with a raw newline in it like that. 4. What happens if you move the code en-masse into a method: |a = 1 |print " |" |b = 2 might easily become |def my_method | a = 1 | print " | " | b = 2 |end 5. Why take 9 characters to do what you can do more clearly with 4? 6. I guess I just don't like it :) Dave