Swift lacks a 'pure' keyword

Originator:klausa
Number:rdar://17782103 Date Originated:23-Jul-2014 08:36 PM
Status:Duplicate of 15587352 (Open) Resolved:
Product:Developer tools Product Version:Current as of Xcode 6 Beta 4.
Classification:Feature (new) Reproducible:Always
 
There is no way to indicate to compiler and/or other programmers that given function is 'pure' in a functional programming meaning of the word.

It's awesome that Swift gives us many facilities to write things in purely functional way, but having a compiler check for side-effects could help prevent entire category of bugs.

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!