test loops during tip bottom? (while vs. while)
when i holding cs college (mid 80's), ideas constantly steady always loops exam during tip (while...) rather during bottom (do ... while) loop. notions mostly corroborated adult references studies showed loops tested during tip statistically many some-more approaching repremand bottom-testing counterparts.
as result, i roughly always loops exam during top. i don't introduces additional complexity code, nonetheless box seems rare. i notice programmers tend roughly exclusively loops exam during bottom. i constructs like:
if (condition)
{
do
{
...
} while (same condition);
}
or opposite (if inside while), creates me awe indeed wrote proceed total if matter satisfied loop didn't hoop zero case.
i've finished googling, nonetheless haven't means any novel subject. guys (and gals) your loops?
Comments
Post a Comment