[swift-evolution] Allowing Characters for use as Custom Operators

Chris Lattner clattner at apple.com
Sat Jan 9 23:30:20 CST 2016


On Jan 9, 2016, at 7:50 PM, Dennis Lysenko <dennis.s.lysenko at gmail.com> wrote:
> Chris, perhaps there is a disconnect in our perceptions of the commonly proposed list. Based on the way you and others have referenced the commonly proposed list, it comes off as a blacklist of sorts. That is, "it's on the commonly proposed list" seems to be seen as an argument against a proposal. I only worry that the mere presence of something on the commonly proposed list will serve as a deterrent to legitimate proposals involving it in the future. 

Hi Dennis,

I’m sorry for the confusion on this.  The very first paragraph of that page says:

… If you're interested in pursuing something in this space, please familiarize yourself with the discussions that we have already had. In order to bring one of these topics up, you'll be expected to add new information to the discussion, not just say "I really want this" or "This exists in some other language and I liked it there".

The intention is to avoid re-treading old ground, not to say that something is impossible.

> If you have taken that into consideration when deciding to place infix functions on the commonly proposed list then fair enough. I just feel that infix functions have not been discussed nearly as much as, say, "indentation over brace syntax" or "getting rid of ternary", and it's a bit preemptive to put such a dent in potential future discussion because you personally cannot imagine a use case warranting the language change.
> 
> Out of curiosity, has there even been a top-level proposal for infix functions that generated significant discussion?

Yes, it has come up several times in different contexts.  The advantage of “x foo bar” (potentially with sigils around foo) over “x.foo(bar)” has consistently been seen as not worth adding complexity for.  Perhaps you are thinking of something else?

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160109/babc5e05/attachment.html>


More information about the swift-evolution mailing list