Skip to content
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

init_with => decode_with & add "psych" to method names #6

Closed
sunaku opened this issue Sep 6, 2010 · 2 comments
Closed

init_with => decode_with & add "psych" to method names #6

sunaku opened this issue Sep 6, 2010 · 2 comments

Comments

@sunaku
Copy link

sunaku commented Sep 6, 2010

I think the "init_with" hook-method should be called "decode_with" so that it is symmetric with the "encode_with" method.

In addition, putting psych in the hook-method names would be helpful:

  • encode_with() => encode_with_psych()
  • init_with() => decode_with_psych()

This ought to reduce method-name collisions as well. Cheers.

@tenderlove
Copy link
Member

I'm keeping it encode_with and init_with. Also, the methods are not supposed to be specific with psych, so adding "psych" to the method names is not helpful.

@sunaku
Copy link
Author

sunaku commented Sep 6, 2010

Okay, adding "psych" to the method names is not necessary.

However, encode_with and init_with seem like an odd pair. Encode & decode are a more natural pair IMHO, like load & dump, serialize & deserialize, pack & unpack, deflate & inflate, mux & demux, and so on.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants