-
Notifications
You must be signed in to change notification settings - Fork 29
Add some docs #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Really nicely explained, good work. Perhaps @robkuz can give some thoughts too, in case there's anything else that isn't obvious in here. Looks great to me though! |
Thanks :) I think it's probably worth adding a small section that says something like "but I just want to serialize and deserialize my types!" and points to argonaut-codecs at some point too, but I was intending to address that later, perhaps together with docs for argonaut-codecs. It might be the case that people don't need to know very much about this library to be able to use argonaut-codecs. |
``` | ||
|
||
And indeed, some might even say this is the obvious approach. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this opening - it sets the mindset the reader should have.
Alas I would name the data constructors differently as there a indeed types with names you are using here. Yes I know its only type synonyms yet it could easily confuse when you look into Pursuit and find exactly those types.
What about JSNull, JSBoolean ...
Or even better NullWrapper, BooleanWrapper ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constructor names do correspond exactly to the real types which have those names, though, so I think it makes sense to use the same names. It does also say that Argonaut does not use this approach in the next paragraph.
I pushed a new commit with the following improvements:
I did consider putting |
I think this will do for now. I might come back to this later and write a fuller example as @robkuz suggested, but I am starting to suspect that the effort would be better spent on examples and docs for |
Amazing work! Reading the docs really helped me understand what's going on, especially around the |
You're welcome :) |
No description provided.