On Wed, Oct 11, 2017 at 6:06 PM, Nevin Brackett-Rozinsky < nevin.brackettrozin...@gmail.com> wrote:
> On Wednesday, October 11, 2017, Kelvin Ma via swift-evolution < > swift-evolution@swift.org> wrote: > >> Yes, a 0-ary operator like that would have to be hard baked into the >> language itself. >> > > Actually, you can just make a subscript which takes a function as an > argument, and call it by passing in the ellipsis operator. > > Nevin > > > > Of course, the subscript notation has much more serious problems, there >> is no way to allow one-sided subscripting, but disallow two-sided >> subscripting for the memory API, while still allowing two-sided >> subscripting for ordinary slicing operations. This is why I still think >> at:from: is the much better syntax. >> >> On Wed, Oct 11, 2017 at 3:01 PM, Nevin Brackett-Rozinsky < >> nevin.brackettrozin...@gmail.com> wrote: >> >>> I believe Kelvin was asking about the usage of ellipsis *by itself*, as >>> in Xiaodi’s example, “newBuffer[...]”. >>> >>> Nevin >>> >> I mean,,, you can,,, but that’s kind of weird
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution