News for hackers. Stuff that matters.
Re:Arrays considered somewhat harmful by JoachimSchipper on Tuesday January 25, 2011 @04:48AM (#2138572)
const, of course, comes from C, where it works pretty well; unfortunately, C++ introduced features (e.g. templates) that didn't work well with const, resulting in stuff like vector::const_iterator (like vector::iterator, but for const vectors. It's completely different from vector::iterator, or so the compiler insists.)

Java is meant to be "C++ without the sharp bits", and removed this feature (and a host of other stuff); I imagine the fact that arrays are not "OO" enough has also something to do with it. C# is meant to be "Java done right/the MS way", and followed suit.

Re:Arrays considered somewhat harmful by scott_s on Tuesday January 25, 2011 @06:57PM (#2141482)
The concept of const actually comes from C++, and was back-ported to C.

I see how const_iterator can be a stumbling block, but I'd like to hear your reason for why it doesn't work well. It is different than iterator, since const_iterator accesses const values (by convention).