Closed phadej closed 1 year ago
I was thinking Aeson could retain backwards compatibility
It's not worth it. There are barely any direct users of these https://hackage-search.serokell.io/?q=liftToJSON and arguably the ones who are (e.g. autocodec
, insert-ordered-containers
, should adapt and could adapt easily).
EDIT: In fact liftToJSONOmit _ = liftToJSON
would make generic deriving "wrong" by default. The same problem as with toEncoding
: people (e.g. yourself) forget to define it. The current design of toEncoding = toEncoding . toJSON
makes doing wrong thing easy for the sake of backward compatibility which is moot now about a decade ago. This is an example while I'd just break things right away, instead of waiting indefinitely for people to start doing the right thing.
@phadej That all makes a lot of sense. Thanks for explaining the situation to me. (Also, I'll start defining toEncoding
!)
Continuation of #1023