[swift-evolution] Pitch: Progress Tracking in Swift

Joe Groff jgroff at apple.com
Mon Jan 18 21:45:18 CST 2016


> On Jan 18, 2016, at 7:39 PM, Charles Srstka via swift-evolution <swift-evolution at swift.org> wrote:
> 
> On 2016-01-18 22:24, FĂ©lix Cloutier wrote:
>> In terms of which functions need it, I think that reporting progress
>> is a relatively niche feature.
> 
> How is it niche? Very few apps don't have any places where progress tracking (and user cancellation) would be useful, and it's currently something that has to be done with workarounds that are either clunky or unsafe.
> 
>> I would by far prefer that we work on
>> infrastructure to implement a library-driven solution. To me, it would
>> be a missed opportunity to show off what the language can (will be
>> able to) do without having to bake it into the compiler.
>> For instance, this could probably be solved without specific compiler
>> support if Swift had a macro system and resumable functions.
> 
> Apple has repeatedly stated in the past that the lack of macros/a preprocessor is supposed to be a feature, not a bug (cf. https://developer.apple.com/swift/blog/?id=4). I know there have occasionally been some statements on the lists contradicting the official stance, but nonetheless I'm not sure we can count on Swift gaining a macro system. Also, implementing things like this via macros seems a bit... icky to my personal tastes.

Lacking the C preprocessor is a feature, lacking a macro system isn't.

-Joe


More information about the swift-evolution mailing list