Swift 1.2: separate @autoclosure from @noescape

Originator:kenferry
Number:rdar://19821429 Date Originated:2/12/2015
Status:Open Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:
 
@noescape is very nice for making control flow type type constructs, but I don't understand why it's implied by @autoclosure.

A construct for which it is nice to have @autoclosure without @noescape is SICP streams, https://mitpress.mit.edu/sicp/full-text/sicp/book/node70.html . This is basically what anyone trying to do functional reactive programming type stuff, or Haskell-style laziness, would want. It seems appropriate to me to require self. when referencing properties in an @autoclosure but not @noescape context.

I'm not sure if part of the point here is to limit the craziness with @autoclosure, but @autoclosure is inherently an extremely special-purpose, kind of crazy, construct. I don't think _requiring_ @noescape is doing much to limit that, and it's cutting out useful cases.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!