[swift-evolution] [Proposal idea] Support for pure functions

Jacob Bandes-Storch jtbandes at gmail.com
Mon Dec 21 14:05:00 CST 2015


On Mon, Dec 21, 2015 at 11:55 AM, Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:

> …there probably has to be some way to unsafely “force a call to a non-pure
> function to be allowed in a pure one”, both because of type system
> limitations as well as interoperability with C and other languages.  Even
> ignoring issues around errno, it would be sad for a pure function to not be
> able to call “sin(x)” just because it weren’t marked __attribute__((const)).
>

Minor tangent, but should the same apply to @noescape? (Lack of this is why
I bothered with SE-0012
<https://github.com/apple/swift-evolution/blob/master/proposals/0012-add-noescape-to-public-library-api.md>
)

Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151221/c786086a/attachment.html>


More information about the swift-evolution mailing list