[swift-evolution] [swift-users] for in? optionalCollection {

Tino Heth 2th at gmx.de
Mon Feb 13 07:40:25 CST 2017


> This would be more easily done than new syntax, surely.
… and it wouldn't increase the size of the language, so in general, I prefer library-solutions.

I'd expect some pushback against the conformance, but my personal opinion is that the difference between an empty collection and a missing collection doesn't matter most of the time.

Performance doesn't matter most of the time as well ;-), but imho it's a big plus if the most elegant solution is the fastest, too (and I have no idea if or when the compiler infrastructure is clever enough to recognise empty loops without instantiating useless objects).

But afaics, there is some consensus that Optional<Sequence> deserves some sugar applied to it — either in the language, or in the stdlib.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170213/96a2773f/attachment.html>


More information about the swift-evolution mailing list