[swift-evolution] Three quick(ish) generics enhancements; *maybe* phase 1

Tino Heth 2th at gmx.de
Fri Dec 23 05:13:22 CST 2016

My personal theory of the whole phase-one construct is that it's just a way to calm everyone down, so that there is more time to actually do some work on the code ;-)

Afair, the conversation about this didn't fade out slowly, but was stopped by someone saying "that addition is to big to be considered now".
I'm to lazy to fight with the medium to find a reference, but there is a draft for a proposal:
https://github.com/SwiftInofficialEvolution/Home/wiki/compile-time%20parameters <https://github.com/SwiftInofficialEvolution/Home/wiki/compile-time%20parameters>

I think the idea is quite useful, but it might be confusing for some people that they can create Vector<Int, size: 4> but not Vector<Int, size: myIntValue>.
The issue with the latter is obvious when you fully understand the concept, but if myIntValue is known to be a constant at compile time (or a fixed case of an enum…), it's harder to decide wether the compiler should accept it.

In some aspect, the parameters have requirements that are opposite to "inout" — but that's a very fresh thought, and I've no idea if that duality might help.

- Tino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161223/c8b457a4/attachment.html>

More information about the swift-evolution mailing list