Subject: Re: [std-proposals] function at() for span<> that throws exception on out-of-range, like vector and array ::at()
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-12-01 11:24:43
On Saturday, 30 November 2019 12:56:11 PST Ville Voutilainen via Std-Proposals
> > 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.
> *baffle* but 'defensive programming' was NEVER the argument of (some
> of) those who advocated for functions that
> would throw on logic errors.
Defensive programming is also what got us Annex K in the C standard.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel System Software Products
STD-PROPOSALS list run by email@example.com
Standard Proposals Archives on Google Groups