News for hackers. Stuff that matters.
Re:Tell HN: C Experts Panel – Ask us anything about C by kazinator on Tuesday April 14, 2020 @05:28PM (#22871694)
C++ has features in its syntax so that you can write objects that behave like arrays: support [] indexing via operator [], and can be passed around (according to whatever ownershihp discipline you want: duplication, reference counting). C++ provides such objects in its standard library, such as: std::basic_string<T> and std::vector<T>. There is a newer std::array also.
Re:Tell HN: C Experts Panel – Ask us anything about C by pjmlp on Wednesday April 15, 2020 @02:47AM (#22875239)
And depending on the compiler they can also bounds check, even in release builds, it is a matter of enabling the right build configuration flags.