News for hackers. Stuff that matters.
Re:Parsing Excel Spreadsheets with Swift's Codable Protocols by oflannabhra on Monday November 12, 2018 @01:55PM (#18434710)
The Codable protocol in Swift is game-changing. Max Howell (homebrew author) recently started a series of articles[1] in which he used Codable structs as the shared data model in both the backend and frontend of his new app Canopy. Even though communication is through HTTP and JSON, he never even has to touch it.

[1] - https://medium.com/@mxcl/server-side-swift-making-canopy-2ed...

Re:Parsing Excel Spreadsheets with Swift's Codable Protocols by mpweiher on Monday November 12, 2018 @03:31PM (#18435457)
> Codable protocol in Swift is game-changing

Which is really weird, considering Objective-C had automatic "activation/passivation" from the beginning (early 80s), and it was pretty trivial to adapt similar mechanisms later.

Re:Parsing Excel Spreadsheets with Swift's Codable Protocols by maxdesiatov on Monday November 12, 2018 @04:08PM (#18435838)
Except that in Objective-C it's a runtime feature, which is by definition slower. Swift's Codable implementation is generated by the compiler or is hand-written with an obvious benefit of a stronger type system.
Re:Parsing Excel Spreadsheets with Swift's Codable Protocols by mpweiher on Thursday November 15, 2018 @10:14AM (#18459840)
Have you measured this? (I have)
Re:Parsing Excel Spreadsheets with Swift's Codable Protocols by aaaaaaaaaab on Monday November 12, 2018 @02:49PM (#18435122)
Data model != request/response structs

It’s a very bad idea to intermingle the two.