Replies: 2 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
My 2 cents: Dropping But what about What about I get |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If you go back to the original README for language-ext from nearly 10 years ago. You'll see its original reason to exist was:
We now have first-class tuple support, nullable references, better lambda inference, and new list syntax
[1, 2, 3]. The one thing we don't have (officially) is aUnittype, but I guess we can't win them all.Obviously, language-ext is much more than a resolution of these issues, but I think it's interesting to see how far we've come in that time.
Originally language-ext was setup to not allow
nullin any of the core types. With exceptions forOptionUnsafeandEitherUnsafe- that were namedUnsafeas a nod to the risk of usingnull.I am doing my best to migrate all of language-ext to have nullable annotations (it's a massive effort!). Though one thing that strikes me now is that maybe we don't need
OptionUnsafeandEitherUnsafeany more. With nullable annotations we could haveOption<A?>and then let the compiler warn the user, rather than completely blockingnullfrom the 'container' types.Full Proposal
OptionUnsafeandEitherUnsafewith the[Obsolete]attributeOption,Either,Seq, etc.) use nullable referencesThe only downside I can see is for those that don't have
<Nullable>enable</Nullable>in their projects. They'll lose the protective benefits of the null-rejecting types. The upside is that every language-ext 'container' type can be opted into usingnullreferences (and it's declarative).Beta Was this translation helpful? Give feedback.
All reactions