[swift-evolution] SE-1084 (B): buffer pointer partial initialization API
kelvin13ma at gmail.com
Wed Oct 11 18:17:09 CDT 2017
On Wed, Oct 11, 2017 at 6:06 PM, Nevin Brackett-Rozinsky <
nevin.brackettrozinsky at gmail.com> wrote:
> On Wednesday, October 11, 2017, Kelvin Ma via swift-evolution <
> swift-evolution at 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.
> 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.brackettrozinsky at gmail.com> wrote:
>>> I believe Kelvin was asking about the usage of ellipsis *by itself*, as
>>> in Xiaodi’s example, “newBuffer[...]”.
I mean,,, you can,,, but that’s kind of weird
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution