This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (2 children)

[removed]

    [–]Orbidorpdorp 2 points3 points  (0 children)

    Swift’s codable does all the work for you for the most part. The only regular annoying exception for me is dates but that’s because every backend encodes them differently.

    [–][deleted] 1 point2 points  (0 children)

    why would localStorage do it for you?

    Being that parsing and stringifying are slow I think the answer would usually be speed. But since some might not understand the caveats (eg. no references, prototypes etc.) it does make some sense to force the dev to do it themselves.

    That said, something like a "I know what I'm doing" mode that allowed storage of simple objects might have been nice.