-
Notifications
You must be signed in to change notification settings - Fork 9
True false operators for Maybe<T> #1
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
base: master
Are you sure you want to change the base?
Conversation
this gives us initialization potential with x |= 7;
I had to research a bit, but I'm pretty sure the false operator is only used for short circuiting the && operator
|
Thanks for the pull request! I'll take a look at it. |
|
I'm really liking the addition of the I'm not so sure about the addition of the |
|
the true operator is required in order to make I left the |
|
I should clarify a little more. The difference between |
|
I knew the Take a look at the |
I added
true&|operators forMaybe<T>which givesMaybe.NoValuea meaning that feels more likeNonein python ornilin ruby (more like nil than None). Now you can borrow ruby's initialization syntax:likewise, you can also use
||for null coersion now:I'm aware this is already available through other iSynaptic facilities, but this gives it a very fluent syntax and makes C# start to feel even more like those scripting languages you've used.