[swift-evolution] Support for a KeyCodingStrategy option in JSONEncoder and JSONDecoder
Eagle Offshore
eagleoffshore at mac.com
Tue Oct 24 00:43:46 CDT 2017
> On Oct 23, 2017, at 3:19 AM, Mike Kluev via swift-evolution <swift-evolution at swift.org> wrote:
>
> having Codable does not contradict having introspection / reflection.
But we don't have general introspection/reflection/dynamic invocation. Which would have been a more worthwhile thing to spend time on as it enables many more features.
> general (or shall we say custom) approaches that use introspection / reflection tend to work much slower (from Objective-C experience). i have no data if Codable is performant in these regards but at least it has a potential to be more optimal than a general solution based on introspection / reflection.
Performance is at the very bottom of my list of things I care about - especially with regard to JSON processing or other format translations where the program is IO bound.
My Objective C KVC based mapper to SQLite was incredibly performant with mapkit when I was mapping thousands of pins stored in a very large local database. Performance, as an argument against flexibility, is completely unpersuasive.
Stuff is much more than fast enough in the application domain.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171023/57e8974e/attachment.html>
More information about the swift-evolution
mailing list