[148968] in cryptography@c2.net mail archive
Re: [Cryptography] defaults, black boxes, APIs,
daemon@ATHENA.MIT.EDU (James A. Donald)
Wed Jan 8 12:32:56 2014
X-Original-To: cryptography@metzdowd.com
Date: Wed, 08 Jan 2014 18:13:53 +1000
From: "James A. Donald" <jamesd@echeque.com>
To: cryptography@metzdowd.com
In-Reply-To: <59847F4D-58E2-4144-94F4-6D8DA3F7D2CE@lrw.com>
Reply-To: jamesd@echeque.com
Errors-To: cryptography-bounces+crypto.discuss=bloom-picayune.mit.edu@metzdowd.com
On 2014-01-07 21:52, Jerry Leichter wrote:
> We regularly sacrifice security on the alter of efficiency - see the
> C++ STL and its approach to iterators. (I wrote about this years
> ago: http://catless.ncl.ac.uk/Risks/21.85.html#subj5.4)
C++ fixed the gets and sprintf problems long ago, and for the most
part it has automated memory management.
To mitigate the iterator problem, needs "for each"
VC 2008 has a non standard, non portable, "for each" command.
The C++11 standard uses "for" to do the same thing.
for (auto x : v) {/*do something with all x in v*/}
for (auto& x : v) {/*do something to all x in v*/}
Then there is the std::for_each with its infamously user hostile
syntax. Requires the lambda calculus to be useful, which is only
available in C++11
_______________________________________________
The cryptography mailing list
cryptography@metzdowd.com
http://www.metzdowd.com/mailman/listinfo/cryptography