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? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution