C++ Logo


Advanced search

Re: [isocpp-ext] namespace composition

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Sun, 30 Apr 2023 10:11:36 +0300
On Sun, 30 Apr 2023 at 04:47, Amir Kirsh via SG20 <sg20_at_[hidden]> wrote:
> I agree with Yehezkel that introducing address sanitizer as their guard is important.
> As they may get index out of bounds also using std::array or C-Style arrays for example.

Well.. introducing address sanitizer to newcomers is perhaps a
distraction and a digression. Your mileage may vary how well address
works out of the box with builds, and whether it's integrated to
debuggers so that your program just stops when it hits
an asan error. A range-check exception might well be more easily
deployed so that newcomers can feasibly use it.

> Then the question should be: how come we are worried about our students and less so about production code? (yes, testing, static code analysis, more mature programmers etc. Yet the risks of out of bounds in production code, if passed all safety nets, are of course much higher).

Because that's Bjarne's target audience, students who may not have
programmed before.

Received on 2023-04-30 07:11:49