Handling argc==0 in the kernel
Handling argc==0 in the kernel
Posted Feb 1, 2022 12:59 UTC (Tue) by madscientist (subscriber, #16861)In reply to: Handling argc==0 in the kernel by NYKevin
Parent article: Handling argc==0 in the kernel
In my experience with C++, people use < most of the time when looping over integers. You can't perform integer looping with an iterator, unless you add your own specializations which people don't really bother to do, so these kinds of loops are written differently than loops with STL iterators anyway.
Also even in C, old-school programmers preferred pre-increment because post-increment was less efficient. Of course it was hard to detect that inefficiency, but it was a peg to hang one's preferential hat on and that's all that's needed when faced with two essentially equivalent choices. In C++ with operator overloading it can be measurably less efficient, of course, depending on the type implementation.
