[swift-evolution] Pure functions
darylew at mac.com
Tue Jan 16 02:24:15 CST 2018
Should we add support for recognition of pure functions? These functions don’t refer to any global state; their return values / outgoing in-out parameter states depend solely on the incoming argument values. I know at least the D programming language acknowledges them.
- Should they be marked with a “pure” attribute?
- How much checking should the complier do on code for purity violations?
- Should purity be a potential requirement on protocol methods?
- What kinds of optimizations are possible?
- What default built-in or standard library support should be pure as an initial set to build your own pure functions?
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution