Ancestors

Written by Mark Malstrom on 2024-08-26 at 18:40

Would it be possible to build a version of Codable with macros and without Mirror or runtime type metadata? Embedded Swift doesn't come with Codable, Encodable, Decodable, Mirror, or runtime metadata, but I'd still like object mapping...

=> More informations about this toot | More toots from markmalstrom@universeodon.com

Written by Matt Massicotte on 2024-08-26 at 23:08

@markmalstrom https://github.com/SwiftyLab/MetaCodable

=> More informations about this toot | More toots from mattiem@mastodon.social

Written by Mark Malstrom on 2024-08-26 at 23:27

@mattiem does this reimplement Codable's functionality? My understanding was that it just enhances the existing protocols’ functionality

=> More informations about this toot | More toots from markmalstrom@universeodon.com

Toot

Written by Matt Massicotte on 2024-08-26 at 23:31

@markmalstrom I actually don’t know! I just knew this existed and thought maybe it would be interesting. Sorry I should have added some context to that.

=> More informations about this toot | More toots from mattiem@mastodon.social

Descendants

Written by Mark Malstrom on 2024-08-26 at 23:39

@mattiem oh! Gotchya. Yes, it is interesting, but I think most of what it's doing is generating custom inits for Codable to then do magic with and since that magic doesn't exist in Embedded Swift, I’m trying to figure out if I can recreate all that magic myself without using Mirror or runtime metadata.

=> More informations about this toot | More toots from markmalstrom@universeodon.com

Written by Matt Massicotte on 2024-08-27 at 00:04

@markmalstrom Ahh ok…

I’ve done a little of this kind of stuff for my persistence library. It doesn’t have to do any examination of the actual property types so it’s pretty superficial. But could be a good starting point. I think this is possible!

=> More informations about this toot | More toots from mattiem@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113030928668543925
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
283.474167 milliseconds
Gemini-to-HTML Time
0.981236 milliseconds

This content has been proxied by September (3851b).