-
Notifications
You must be signed in to change notification settings - Fork 129
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
Proposal: Rename engines #39
Comments
|
Parser is the right word for JSON -> Object, Serializer is the right name for Object -> JSON. |
@steveklabnik Understood. We need a single term for something that both serializes and parses JSON. What do you favor? |
If you have to pick one, I vote |
I mean, I suppose we could allow users to specify different libraries to parse and serialize but that would add a ton of complexity for a use can that I'm not sure actually exists. In a theoretical universe where the JSON library with the best parsing performance had lousy serialization performance and the library with the best serialization performance had lousy parsing performance, someone might want to use different libraries, but we do not live in such a universe. Despite the name, MultiJSON wasn't really designed for using multiple JSON libraries. It was designed for allowing you to use the best one. Maybe we should change the name of the whole enterprise to BestJSON. |
Hahaha. Yeah. That's why I like |
What about just calling them |
@mbleigh +1. What about |
+1 for |
Sounds like we have a consensus. ish. @sferik you want to do the implementation honors? |
I'm proposing that we change the name of the category of things that convert JSON to Ruby objects and Ruby objects to JSON. Right now we call them "engines". I think that name is suboptimal name for a few reasons:
Rails::Application.superclass
in a Rails >= 3 console).I'd offer the following alternatives to "engines", none of which are perfect, but any of which I believe would be an improvement:
MultiJson.use :json_pure
. This solution allows us to avoid actually picking a name (at least at the interface level) and comes from the rich tradition of fill-in-the-blank method names in Ruby, includingstart_with?
,end_with?
,sort_by
,form_for
, etc.We could also just call them "libraries", but I think that's even more generic (and therefore worse) than "engines".
Or we could stick with "engines".
This is a hardcore breaking change ✊💣 but as long as we're planning to push a backwards-incompatible 2.0 release, we might as well make all the API changes we think will improve the library.
The text was updated successfully, but these errors were encountered: