G
gwowen
Less ignorant people know that "do not use C-style arrays" is on the top of
C++ guidelines anywhere.
Also, std::tr1::array<foo_t,N> (the C++ std-library equivalent of
C90's foo_t foo[N]) absolutely *does* have .at(). Of course you can't
do C99 VLA's like that, but C99 VLA's don't have sensible semantics
for detecting memory allocation fails (i.e. stack-overflow) anyway. C+
+ gives the programmer the choice between C-style "unsafe" indexing
*and* safe indexing. Whatever "premature optimisation" means, I'm
pretty certain its not providing
[Besides, Java arrays are heap based like std::vector<> - so it makes
no sense to say "Java's equivalent of std::tr1::array are type-
checked" as no such object is exists]