Closed JoeFerrucci closed 5 years ago
@matsoftware You approved this PR, now what?
It’s just to push the maintainer to merge it (and tag a new version so we can use the Swift 4.2 upgrade as well).
On Wed, 3 Oct 2018 at 16:18, Joe Ferrucci notifications@github.com wrote:
@matsoftware https://github.com/matsoftware You approved this PR, now what?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ElaWorkshop/TagListView/pull/201#issuecomment-426676578, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJClsT3AOArnLvNCHwsA4dUwzXq5euHks5uhNU_gaJpZM4Wy6py .
--
Mattia Campolese www.matsoftware.it
Code LGTM.
One question is that using defer
makes code less readable. I'd prefer using defer
in the error handling functions.
I used defer
in these places, because they ensure no matter what happens in the block, things that need to be run at the end of the block are done so at the end, and not accidentally out of order. Example is the rearrangeViews
: call rearrange after adjusting the padding.
defer
,map
,filter
,forEach
.defer
where appropriate: some methods and property observers need to ensure some clean-up happens after the block is run.defer
s are great for this. In some property observers whererearrangeViews()
was the only code executed, I chose not to usedefer
even though it would still be semantically appropriate here (if code is added in the future).