[swift-evolution] Proposal: Allow operators to have parameters with default values

Swift swift at davedelong.com
Fri Nov 3 23:16:33 CDT 2017

> On Nov 3, 2017, at 9:59 PM, Chris Lattner <clattner at nondot.org> wrote:
>> On Nov 3, 2017, at 8:40 AM, Dave DeLong via swift-evolution <swift-evolution at swift.org> wrote:
>> That’s cool, but a hygienic macro system isn’t anywhere on the Swift roadmap.
>> Chris has mentioned in interviews that such a system is "a big feature that’s open-ended and requires a huge design process” which makes off-the-table for Swift 5, and (I’m guessing) unlikely for Swift 6 too.
>> Personally I’d like to be able to better debug my apps in Swift 4.1 rather than waiting another 2 or 3 years for a magical macro system to somehow solve this.
> You’re assuming somehow that this is an “easy” feature.  I haven’t seen a concrete proposal, but I don’t see how adding hidden options to operators compose into the existing system.
> -Chris

It’s possible I missed something, but my attempt at implementing it only touched 3 files. One was the actual implementation, another was adapting the diagnostics messages, and the third was the tests. 

I’m still new to building swift myself, but the tests all passed...


As for a formal proposal, I’ll hopefully have some time this weekend to put that together. 

Can you expound some more on what you mean by hidden options to operators not composing into the existing system? I’m not sure I follow. 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171103/06ab5643/attachment.html>

More information about the swift-evolution mailing list