It would be handy if a callback could be marked as required with an
optional descriptive message i.e

class BackgroundTask {
 func run(end: @required("You must call end otherwise iOS will penalise
your app for being a bad citizen") () -> Void)
}

That was the developer can comunicate the bad things that can happen if
this callback isn't called such as iOS peanlizing them for not ending a
background task or perhaps memory leaks caused by clean up code unable to
be triggered.

*___________________________________*

*James*

*[email protected] <[email protected]>⎥supmenow.com <http://supmenow.com>*

*Sup*

*Runway East *

*10 Finsbury Square*

*London*

* EC2A 1AF *
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to