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 parser for Optional types to avoid the null madness #78

Merged
merged 2 commits into from
Sep 14, 2015
Merged

Conversation

lucidd
Copy link
Member

@lucidd lucidd commented Jun 11, 2015

This adds a parser for Optional<T> for all types T we can already parse.
The main motivation behind this is to banish null as much as possible in favor of the much saver abstraction Optional<T> which denotes a possibly absent value. This addresses concerns raised in #77

@lucidd
Copy link
Member Author

lucidd commented Sep 9, 2015

I just rebased this to the latest master. I would say we merge this now as is even if we are not able to completely enforce that non optional values are never null its still valuable to mark Optional values as such and have them parsed accordingly.

@renner
Copy link
Member

renner commented Sep 11, 2015

We can merge this if you need it, choose yourself if you want to merge it from here or include the commits with #109.

assertEquals(expected, result.maybeInts);
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put only one empty line between methods (here and above this method).

@lucidd
Copy link
Member Author

lucidd commented Sep 11, 2015

I would prefer merging this PR first i will rebase #109 accordingly.

@lucidd lucidd merged commit 4fb5cb0 into master Sep 14, 2015
@lucidd lucidd deleted the optional branch October 7, 2015 10:54
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