J
Jon Skeet [C# MVP]
GlennDoten said:I almost added that I don't mind the second idiom because I pretty much
would never do a "straight" sr.ReadLine call but would wrap that in a
method which would do line counting, skipping blank lines, and that sort
of thing. But point taken.
The thing I don't like, in terms of clarity, with the first idiom is
that it leads to much more complex variations on that theme. (Start with
the weed and next week your on the heroin...)
That's certainly a valid concern, but for some reason I don't see it as
a problem in real life - I can't remember any bad code I've seen which
looks like it has its stem in this idiom.