[swift-evolution] Notes from Swift core team 2016-03-15 design discussion
Douglas Gregor
dgregor at apple.com
Wed Mar 23 11:38:10 CDT 2016
> On Mar 16, 2016, at 5:27 PM, Alex Martini via swift-evolution <swift-evolution at swift.org> wrote:
>
> To help keep proposals moving forward, the Swift core team has set aside some time specifically for design discussions of upcoming proposals. Below are some rough notes from the yesterday's discussion.
>
> These are informal comments, intended to guide the proposals in directions that draw constructive feedback. You are welcome to ignore the feedback, agree with it, or disagree with it. As always, the formal decision doesn't happen until after the review period ends.
>
> SE-0048 <file:///Users/alexmartini/DevPubs%20Git%20Repositories/Swift%20Language%20Review/_build/html/LR_MeetingNotes/MeetingNotes-03-15-2016.html#se-0048>
> This is straightforward and 95% implemented. The contentious point is that it starts simple: you can’t add constraints to the type alias.
>
> We want to avoid type-based metaprogramming.
>
> Unclear if this would work:
>
> typealias StringDictionary<T> = Dictionary<String, T>
> It need to infer that T must be hashable. Maybe it’s only 85% implemented.
>
>
Clarification here: the example is
typealias DictionaryToStrings<T> = Dictionary<T, String>
Either we infer T to require Hashable, or we call this ill-formed and require the user to write
typealias DictionaryToStrings<T: Hashable> = Dictionary<T, String>
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160323/6870942d/attachment.html>
More information about the swift-evolution
mailing list