[swift-evolution] [Pitch] Adding safety to arrays
David Sweeris
davesweeris at mac.com
Thu Apr 13 19:11:39 CDT 2017
> On Apr 13, 2017, at 15:01, Tony Allevato <tony.allevato at gmail.com> wrote:
>
> My 2 cents: Giving users checked subscripts for arrays will do more harm than good for novice programmers—they're going to do the wrong thing with them.
I'm torn... On the one hand, I see the logic in this. On the other hand, I suspect many developers will end up writing such a function anyway (regardless of whether it's a good idea), and it'd be nice if there was a standard spelling.
I realize this is not a convincing argument; I'm just thinking out loud a bit...
Maybe I'll start a "StdBadIdeasLib" project, for all the ideas that could be implemented straightforwardly on top of the existing stdlib, but get rejected because they're bad ideas... Come to think of it, that's probably a bad idea itself (at least it'd be a well-named library, though).
- Dave Sweeris
More information about the swift-evolution
mailing list