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

Add depreciation to B64.decode function #22

Closed
wants to merge 1 commit into from

Conversation

dinosaure
Copy link
Member

No description provided.

@avsm
Copy link
Member

avsm commented Dec 13, 2018

I don't think this is quite right -- don't we want to revise the interface so that the decode function returns an option in the future, and decode_exn will return an exception? If we want decode_opt, then there is no need to deprecate decode as the exception is documented.

@hannesm
Copy link
Member

hannesm commented Dec 13, 2018

I agree with @avsm (at least partially): I'd be in favour of decode returning either an option or a proper Error (containing some information, including at which byte of the input it encountered an error), and don't provide a decode_exn (if this is needed by someone, they can always write it themselves, but in general it is unsafe and does not conform to the MirageOS guidelines "don't leak exceptions")

@dinosaure
Copy link
Member Author

Ok, I will do the update, in my mind is to not break the API but if it's fine, I agree with you.

@avsm
Copy link
Member

avsm commented Jan 17, 2019

Closed in favour of #24

@avsm avsm closed this Jan 17, 2019
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.

3 participants