Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Format type order #15

Closed
pauldijou opened this issue Aug 14, 2014 · 1 comment
Closed

Format type order #15

pauldijou opened this issue Aug 14, 2014 · 1 comment

Comments

@pauldijou
Copy link

I was just wondering... currently, the Format type order is the following:

trait Format[IR, IW, O] extends RuleLike[IR, O] with WriteLike[O, IW]

I don't quite find it fully readable. If we read Rule and Write, it looks like "IR, O, O, IW", which is like "IR, O, IW". It means, "I can go from IR to O and from O to IW". Nice. So why not having:

trait Format[IR, O, IW] extends RuleLike[IR, O] with WriteLike[O, IW]
// Wuuut?
implicit val userFormat = Format.gen[JsValue, BSONDocument, User]

// Ohhhh, I see!
implicit val userFormat = Format.get[JsValue, User, BSONDocument]
@jto
Copy link
Owner

jto commented Apr 7, 2015

That would break existing code. So while it makes sense, nope

@jto jto closed this as completed Apr 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants