Off list message that I need to reply to (the non-innocent shall remain non-nameful): STD == Standard Template Library Contagiously yours, jj Other off-list messages: _please_ be patient, I am seriously underwater, later, thanks for your patience. * Joerg Arndt <arndt@jjj.de> [Jun 11. 2014 18:53]:
* Henry Baker <hbaker1@pipeline.com> [Jun 11. 2014 15:53]:
[...]
Part (most) of the problem with array bounds checking was the idiotic separation of the loop index from the array itself.
for i=0 to n-1 do something with array[i]
Using C++11's mechanism ("for_each" in about every other language):
Let X be a container (like an array or std::vector)
for (auto t : X) do_something_with(t);
The re-spawned keyword "auto" means "whatever type, take the correct one".
I dare say this is as clean as it gets.
Best, jj
[...]
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun