Errors in TDPL
Jonathan M Davis
jmdavisProg at gmail.com
Wed Jun 23 16:50:18 PDT 2010
eles wrote:
> It is a shame that compatibility issues prevail over quality and
> improvement. Ditching the do...while loop could be unacceptable now,
> but why do not propose a better alternative mechanism? That way, we
> would have both compatibility and quality.
>
> eles
Quality prevails over compatibility when the quality gain is deemed to
exceed the problems incurred by losing compatibility.
In this case, do-while works just fine. Lots of people are used to using it
and have never even heard of repeat-until, having never used Pascal or any
other language that used it. At this point, C's influence far outweights
Pascal's.
Also, AFAIK, do-while is not generally a major source of bugs. As such,
while another construct might be better, since the current one isn't much of
a problem, it's not worth breaking compatibility. If it were shown that do-
while was a big problem, then it might be. But at this point, do-while works
just fine, so it's not worth changing it.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list