[swift-dev] KVO Context Param

2016-10-06 Thread Tyler Stromberg via swift-dev
Hey everyone, One of the things that came up in a code review today was the type of KVO's context param. If you look at the function signature it gets imported as UnsafeMutableRawPointer?. Is there ever a need to mutate this parameter, and if not can we change it to be UnsafeRawPointer? instead

[swift-dev] KVO Context Param

2016-10-07 Thread Tyler Stromberg via swift-dev
Hey everyone, One of the things that came up in a code review today was the type of KVO's context param. If you look at the function signature it gets imported as UnsafeMutableRawPointer?. Is there ever a need to mutate this parameter, and if not can we change it to be UnsafeRawPointer? instead

[swift-dev] [SourceKit] NSRange, Swift.String, and NSString

2017-03-24 Thread Tyler Stromberg via swift-dev
I'm currently working on integrating SourceKit with a macOS application. AppKit APIs (e.g. NSAttributedString, NSLayoutManager, etc) deal in terms of NSRange (UTF-16 code units?). SourceKit, however, deals in terms of integer offsets and lengths (UTF-8 code units?). Is there a more efficient or

Re: [swift-dev] [SourceKit] NSRange, Swift.String, and NSString

2017-04-06 Thread Tyler Stromberg via swift-dev
> On Mar 24, 2017, at 12:08 PM, Ben Langmuir wrote: > > >> On Mar 24, 2017, at 10:59 AM, Tyler Stromberg via swift-dev >> wrote: >> >> I'm currently working on integrating SourceKit with a macOS application. >> AppKit APIs (e.g. NSAttributedSt

Re: [swift-dev] [SourceKit] NSRange, Swift.String, and NSString

2017-04-06 Thread Tyler Stromberg via swift-dev
ng with SourceKitten than > with with SourceKit directly, since it does a whole lot more, like > dynamically resolving+loading which SourceKit to use, caching expensive > operations, easier multi-threaded access, generating documentation, etc. > >> On Fri, 24 Mar 2017 a