devxoul / Then

✨ Super sweet syntactic sugar for Swift initializers
MIT License
4.18k stars 290 forks source link

@noescape #5

Closed onmyway133 closed 8 years ago

onmyway133 commented 8 years ago

Hi, I just make my Configurable and realize you're 1 step before me :smile:

I see that this pattern is now widely adopted in many projects, like Dip, ... for the compensation of Builder pattern. Like Dip, I have Initable which works on init as well, good for basic usage

One thing you can improve is to leverage @noescape http://nshint.io/blog/2015/10/23/noescape-attribute/

devxoul commented 8 years ago

@onmyway133, thank you for pointing it out! There is already a PR for making closure non-escapable. (#1) This will be shipped in next release.