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

Align pbandk's naming with the conventions in recent Kotlin releases #89

Closed
garyp opened this issue Sep 11, 2020 · 0 comments · Fixed by #90
Closed

Align pbandk's naming with the conventions in recent Kotlin releases #89

garyp opened this issue Sep 11, 2020 · 0 comments · Fixed by #90
Labels
enhancement New feature or request
Milestone

Comments

@garyp
Copy link
Collaborator

garyp commented Sep 11, 2020

Kotlin is starting to standardize on some naming patterns in its standard library and related libraries (like kotlinx-serialization and kotlinx-coroutines). For example, see some of the naming changes introduced in https://github.com/Kotlin/kotlinx.serialization/releases/tag/1.0.0-RC. pbandk should adopt similar naming conventions so that pbandk's API feels more idiomatic and familiar to Kotlin developers.

Specifically, this includes replacing the "marshal"/"unmarshal" terminology with "encode"/"decode" and renaming methods such as Message.protoMarshal() to Message.encodeToByteArray() and Message.jsonUnmarshal(String) to Message.decodeFromJsonString(String).

@garyp garyp added the enhancement New feature or request label Sep 11, 2020
@garyp garyp added this to the 0.9.0 milestone Sep 11, 2020
garyp added a commit that referenced this issue Sep 12, 2020
- Rename "marshal"/"unmarshal" to "encode"/"decode" in all methods and
classes

- Standardize encoding/decoding methods to be named `encodeTo*` and
`decodeFrom*`, similar to naming used in the standard libraries

- Rename the low-level `marshal(MessageMarshaller)` and
`unmarshal(MessageUnmarshaller)` methods to `encodeWith(MessageEncoder)`
and `decodeWith(MessageDecoder)`

Fixes #89
garyp added a commit that referenced this issue Sep 14, 2020
- Rename "marshal"/"unmarshal" to "encode"/"decode" in all methods and
classes

- Standardize encoding/decoding methods to be named `encodeTo*` and
`decodeFrom*`, similar to naming used in the standard libraries

- Rename the low-level `marshal(MessageMarshaller)` and
`unmarshal(MessageUnmarshaller)` methods to `encodeWith(MessageEncoder)`
and `decodeWith(MessageDecoder)`

Fixes #89
@garyp garyp closed this as completed in #90 Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant