Why are most arguments for using a block for an iteration continuation character instead of a return value?

For most iteration blocks, signatures are defined as follows:

void(^)(id obj, BOOL* stop)

It looks better, using the return value to stop the flag.

BOOL(^)(id obj)

However, I believe that there is a good reason why they decided to use the current form instead of a shorter and more convenient form. Why do they use the argument for the stop flag?

+5
source share
1 answer

, , : continue for while? , , , . , break.

. YES, , , . , , *stop YES.

+4

All Articles