Who said that pure functions should be newcomer friendly? Swift attributes are 
way at the end of the swift’s book. Using the -> arrow at first won’t break 
anything. If one would optimize some functions by annotating them to be pure, 
the change to something like ~> would be really easy.

IMHO clustering the whole code with hundred’s of different attributes isn’t the 
right way either. Purity could be easily be expressed throw the arrow, plus it 
enforces you to have a return type (other than Void).



-- 
Adrian Zubarev
Sent with Airmail

Am 17. Februar 2017 um 18:59:17, Nicolas Fezans (nicolas.fez...@gmail.com) 
schrieb:

The arrow proposals -> vs. ~> vs. => are not really much shorter than 
the 4 letters of the pure keyword but just confusing and frightening 
for newcomers (BTW __pure exists in GCC if I remember well) whereas 
"pure func" is something that people can easily google in case they 
need to learn the concept. The different arrows are very compact but 
feel a bit like J, which is a language I would not like swift to look 
like. 
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to