Using only closures over functions in Swift -
after reading functions special case of closures, being named constant closure, there reason use function on closure? ran problem needed pass functions method sequential animation , ended needing transform functions closures. disadvantage , loss of flexibility, why ever want use functions on closures?
i advise use closures whenever need use code once , in point implement in whole code.
if need reuse logic of block of code, best way encapsulate code inside function , use callback.
i can´t imagine situation when need convert functions closures. need create function fits closure signature.
Comments
Post a Comment