Proposal: A Swift Grand Central Dispatch


(Chris) #1

Hello everyone,

Developers have been using Grand Central Dispatch to create asynchronous
code and optimize their applications. However, using GCD with Swift seems
unnatural due to the different naming conventions used. As a result, people
have been using wrappers for GCD instead, such as Async. I, for one,
created this simple wrapper for most used functions of Dispatch.
https://github.com/chrisamanse/SwiftDispatch

It would be nice if the Dispatch framework has a more Swift style
convention to make our codes cleaner.

Cheers,
Chris


(Tony Parker) #2

Hi Chris,

Thanks for sending this out. The API of dispatch in swift (all imported APIs, actually) is always something we are looking into improving. In the timeline for Swift 3, the primary focus for swift-corelibs-dispatch is to get our cross-platform story to be complete. That means being able to use the existing API reliably on all platforms and without introducing a dramatic shift for everyone who is familiar with dispatch today. We should keep ideas like yours in mind in the longer term as we move forward with the project after this initial goal.

- Tony

···

On Jan 16, 2016, at 7:15 PM, Chris Amanse via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

Hello everyone,

Developers have been using Grand Central Dispatch to create asynchronous code and optimize their applications. However, using GCD with Swift seems unnatural due to the different naming conventions used. As a result, people have been using wrappers for GCD instead, such as Async. I, for one, created this simple wrapper for most used functions of Dispatch. https://github.com/chrisamanse/SwiftDispatch

It would be nice if the Dispatch framework has a more Swift style convention to make our codes cleaner.

Cheers,
Chris

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


(Chris) #3

Hi Tony,

All right, looking forward to it after Swift 3.0, Swift 4.0 perhaps since
it will introduce API breaking changes.

Chris

···

On Mon, Jan 18, 2016 at 9:35 AM Tony Parker <anthony.parker@apple.com> wrote:

Hi Chris,

Thanks for sending this out. The API of dispatch in swift (all imported
APIs, actually) is always something we are looking into improving. In the
timeline for Swift 3, the primary focus for swift-corelibs-dispatch is to
get our cross-platform story to be complete. That means being able to use
the existing API reliably on all platforms and without introducing a
dramatic shift for everyone who is familiar with dispatch today. We should
keep ideas like yours in mind in the longer term as we move forward with
the project after this initial goal.

- Tony

On Jan 16, 2016, at 7:15 PM, Chris Amanse via swift-corelibs-dev < > swift-corelibs-dev@swift.org> wrote:

Hello everyone,

Developers have been using Grand Central Dispatch to create asynchronous
code and optimize their applications. However, using GCD with Swift seems
unnatural due to the different naming conventions used. As a result, people
have been using wrappers for GCD instead, such as Async. I, for one,
created this simple wrapper for most used functions of Dispatch.
https://github.com/chrisamanse/SwiftDispatch

It would be nice if the Dispatch framework has a more Swift style
convention to make our codes cleaner.

Cheers,
Chris

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev