Benno wrote:
On Fri Jun 16, 2006 at 13:51:23 +1000, O Plameras wrote:
Matthew Palmer wrote:
It increases complexity, and unnecessary code will also confuse in the
future since a programmer will look at that and think "I think that's
unnecessary, but perhaps there's something special this time that needs
it".
It's special this time here:
#!/usr/bin/env ruby
while not $stdin.eof do
puts $stdin.readline
end
and here:
#!/usr/bin/env ruby
puts $stdin.readline while not $stdin.eof
Ok, but isn't that very different to using the $stdin.readlines function?
In the context of the two examples above,
$stdin.readline yields the same results as $stdin.readlines.
So, as far as the result of my programs above I see no difference. At this
stage, I do not know if there are any underlying differences. All I know is
that I get the results I expected.
O Plameras
_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders