Implementing RawRepresentable, RawValue == String using Codable: keep it DRY for implementation of multiple types: did I do this right?

Can you clarify what you mean? I need RawRepresentable so I can store Date and Decimal in SwiftUI's @AppStorage. @AppStorage only support RawRepresentable where RawValue == String.

I think you mean to use LosslessStrong onvertible instead of Codable?

Decimal is already CustomStringConvertible, to conform to LosslessStringConvertible, we can use this convert from a string into a decimal:

Decimal(string:locale)

but the locale == nil is different on non-Apple platform: Why unable to debug "Step Into" `Decimal(string:locale:)`? - #8 by young