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

replace {:ok} with the more standard :ok #615

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Th3-M4jor
Copy link
Contributor

DO NOT MERGE THIS before we consider 0.10 to be in a stable state, as this is intended to be part of a future 1.0.0 release.

Rationale behind replacement: In all Elixir and Erlang libraries that I can think of, you don't see the one element tuple of {:ok} as a possible return value. Instead you usually see :ok | {:error, reason} when the happy path has no meaningful return value.

This has the added benefit of a micro-optimization that avoids allocating a one element tuple on the heap.

@jchristgit
Copy link
Collaborator

I am interested in merging this in a minor pre-1.0 release, although possibly after 0.10 since that will bring some basic support for running multi-node.

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

Successfully merging this pull request may close these issues.

2 participants