[swift-corelibs-dev] NSSortDescriptor implementation
Hello, Swift community. I would like to participate in implementing NSSortDescriptor. Has anybody already been doing anything with this part of Foundation? If not, I’d be glad to take this task and see what I can come up with. Is there anything I should know before I start? I mean some unobvious subtleties with NSSortDescriptor. ___ swift-corelibs-dev mailing list swift-corelibs-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
[swift-corelibs-dev] Documentation and coding style
Hello everyone. I have a couple of questions about the core libraries that I think would be interesting to discuss. The first question is about documentation comments. From what I can see in the repos and what the core team members say, those libraries lack them a lot. Maybe some of you have already asked this question, but can’t we just copy the Darwin Foundation & XCTest documentation comments? I can see it has been done in some parts of Swift Foundation, so why don’t we apply it to all the APIs? Of course taking into account the possible differences in behaviour or implementation. The second question is about a coding style. It can be seen that in different parts of the Foundation/XCTest the coding style quite often differs. Maybe we could develop some kind of a document that would state the general rules. Do you have any thoughts on this? — Sergej ___ swift-corelibs-dev mailing list swift-corelibs-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
[swift-corelibs-dev] Mark NSUnimplemented functions as unavailable.
I was wondering why cannot we just mark all the methods/properties/functions in Swift Foundation that are NSUnimplemented or call a subroutine that is NSUnimplemented like this: @available(*, unavailable, message: “foo is not implemented yet”) func foo() { NSUnimplemented() } In this case we can be sure at compile time that we don’t use code that will definitely crash. ___ swift-corelibs-dev mailing list swift-corelibs-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
Re: [swift-corelibs-dev] Mark NSUnimplemented functions as unavailable.
Well, here is what I got in IBM Swift Sandbox. http://swift.sandbox.bluemix.net/#/repl/5913a8594ee0cd258050b2fd <http://swift.sandbox.bluemix.net/#/repl/5913a8594ee0cd258050b2fd> If I got you right, it works. Yes, partially implemented functions is a problem. But we definitely could mark the ones that are not implemented at all and not being called. > On 11 May 2017, at 02:43, Philippe Hausler wrote: > > This of course is predicated upon availability macros working appropriately > on linux (which last time I checked we don’t have a version variant). It is > definitely worth investigation. > >> On May 10, 2017, at 16:41, Tony Parker via swift-corelibs-dev >> wrote: >> >> Hi Sergej, >> >> This is a good idea, but there are some additional things to consider. In >> some cases, methods are partially unimplemented (with edge cases, or at >> least less common cases remaining unfinished). The availability macro can’t >> reflect that status. >> >> In other cases, we want to partially implement one function but still call >> through to an unimplemented function. The entire call may fail with the >> assert, but at least we have part of the implementation in place. >> >> - Tony >> >>> On May 10, 2017, at 4:01 PM, Sergej Jaskiewicz via swift-corelibs-dev >>> wrote: >>> >>> I was wondering why cannot we just mark all the >>> methods/properties/functions in Swift Foundation that are NSUnimplemented >>> or call a subroutine that is NSUnimplemented like this: >>> >>> @available(*, unavailable, message: “foo is not implemented yet”) >>> func foo() { NSUnimplemented() } >>> >>> In this case we can be sure at compile time that we don’t use code that >>> will definitely crash. >>> ___ >>> swift-corelibs-dev mailing list >>> swift-corelibs-dev@swift.org >>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev >> >> ___ >> swift-corelibs-dev mailing list >> swift-corelibs-dev@swift.org >> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev > ___ swift-corelibs-dev mailing list swift-corelibs-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-corelibs-dev