[swift-evolution] [Pitch] Introduce user-defined dynamically "callable" types

Nevin Brackett-Rozinsky nevin.brackettrozinsky at gmail.com
Wed Nov 15 20:54:31 CST 2017


Without commenting on anything else, I have encountered one use-case where
it would be nice to be able to “call” an instance. And that is, while
modeling some mathematics, I made a DifferentiableFunction type which
stores a function and optionally a reference to another
DifferentiableFunction (its derivative).

I used the subscript notation for “calling” these DifferentiableFunctions,
because that’s what we have available, but it would certainly be nice to
use parentheses rather than square brackets.

Nevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171115/7ce29c82/attachment.html>


More information about the swift-evolution mailing list