dn-m / MusicXML

Implementation of the musicXML specification in Swift
MIT License
74 stars 20 forks source link

Use XML(En|De)Coder convert(To|From)KebabCase #155

Closed jsbean closed 5 years ago

jsbean commented 5 years ago

The XML(En|De)Coder is able to convert(To|From)KebabCase automatically.

We are currently doing this manually within the CodingKeys enum of each type (as necessary). We could standardize this by configuring XML(En|De)Coder to do it for us.

This seems like it lives at the border of YAGNI, but @bwetherfield has found in his auto-choice-coding-key Sourcery expeditions that human error can be corrected by large-scale automations.

@bwetherfield, @DJBen, whaddya think?

bwetherfield commented 5 years ago

I suppose it’s just a bit more performant to do keys by hand!

jsbean commented 5 years ago

Ah, that's interesting. Hadn't considered that. I think we are in fine shape, really. We aren't going to add more types (unless a new spec comes out).