On Sat, Nov 30, 2019 at 1:21 PM Lyberta via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
Anyway. My fundamental opinion is that operator[] should do bounds
checking while unsafe_at() should not because it is clearly named unsafe.

Should all functions which have preconditions on calling them be named unsafe_*?  I would not want to call unsafe_dereference(ptr) instead of *ptr each and every time I needed to dereference it (for example).  I'm generally against verbosity for common cases.

IMO, at() was a mistake, as the number of people who call it in the name of "defensive programming" far outweighs the few that call it to sanitize input.

However, that ship sailed over two decades ago.

IMO, at() should be added to span for the sake of consistency with other containers.

It may be a battle because some folks (not I) view span as the time to rethink the interface.

As someone who has already fought multiple battles for span, it would take a lot to goad me into presenting such a paper.  I would, however, be likely to support such a paper should it be presented to the committee.

IMO, it is way too late to try and get this added to C++20.
--
 Nevin ":-)" Liber  <mailto:nevin@cplusplusguy.com>  +1-847-691-1404