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
-
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 aUnit
type, 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
null
in any of the core types. With exceptions forOptionUnsafe
andEitherUnsafe
- that were namedUnsafe
as 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
OptionUnsafe
andEitherUnsafe
any more. With nullable annotations we could haveOption<A?>
and then let the compiler warn the user, rather than completely blockingnull
from the 'container' types.Full Proposal
OptionUnsafe
andEitherUnsafe
with 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 usingnull
references (and it's declarative).Beta Was this translation helpful? Give feedback.
All reactions