Language-Ext 5.0 alpha-1
Pre-releaseThis release should only be consumed by those who are interested in the new features coming in the monster v5
release.
Just to give you an idea of the scale of this change:
- 193 commits
- 1,836 files changed
- 135,000 lines of code added (!)
- 415,000 lines of code deleted (!!)
It is a monster and should be treated with caution...
- It is not ready for production
- It is not feature complete
- The new features don't have unit tests yet and so are probably full of bugs
- I haven't yet dogfooded all the new functionality, so it may not seem as awesome as it will eventually become!
If you add it to a production project, you should only do so to see (potentially) how many breaking changes there are. I would not advise migrating a production code-base until I get close to the final release.
I am also not going to go into huge detail about the changes here, I will simply list them as headings. I will do a full set of release notes for the beta
release. You can however follow the series of articles I am writing to help you all prep for v5
-- it goes (and will go) into much more detail about the features.
New Features
- Higher-kinded traits
K<F, A>
- higher-kinds enabling interface- Includes:
- Defintions (interfaces listed below)
- Static modules (
Functor.map
,Alternative.or
,StateM.get
, ...) - Extension methods (
.Map
,.Or
,Bind
, etc.), - Extension methods that replace LanguageExt.Transformers (
BindT
,MapT
, etc. ), now fully generic. - Trait implementations for all Language-Ext types (
Option
,Either<L>
, etc.)
Functor<F>
Applicative<F>
Monad<M>
Foldable<F>
Traversable<T>
Alternative<F>
SemiAlternative<F>
Has<M, TRAIT>
Reads<M, OUTER_STATE, INNER_STATE>
Mutates<M, OUTER_STATE, INNER_STATE>
ReaderM<M, Env>
StateM<M, S>
WriterM<M, OUT>
MonadT<M, N>
- Monad transformersReaderT<Env, M, A>
WriterT<Out, M, A>
StateT<S, M, A>
IdentityT<M, A>
EitherT<L, M, R>
ValidationT<F, M, S>
OptionT<M, A>
TryT<M, A>
IdentityT<M, A>
ResourceT<M, A>
Free<F, A>
- Free monadsIO<A>
- new IO monad that is the base for all IOEff<RT, A>
monad rewritten to use monad-transformers (StateT<RT, ResourceT<IO>, A>
)Eff<RT, A>
doesn't needHasCancel
trait (or any trait)- Transducers
Pure
/Fail
monads- Lifting
- Improved guards, when, unless
- Nullable annotations - still WIP, mostly complete on Core)
- Collection initialisers
Breaking changes
- netstandard2.0 no longer supported (.NET 8.0+ only)
Seq1
made[Obsolete]
- 'Trait' types now use static interface methods
- The 'higher-kind' trait types have all been refactored
- The
Semigroup<A>
andMonoid<A>
types have been refactored - The static
TypeClass
class has been renamedTrait
Apply
extensions that use rawFunc
removed- Manually written
Sequence
extension methods have been removed - Manually written
Traverse
extension methods have been removed ToComparer
doesn't exist on theOrd<A>
trait any more- Renamed
LanguageExt.ClassInstances.Sum
Guard<E>
has becomeGuard<E, A>
UnitsOfMeasaure
namespace converted to a static classEither
doesn't supportIEnumerable<EitherData>
any moreEither
'bi' functions have their arguments flipped- Nullable (struct) extensions removed
- Support for
Tuple
andKeyValuePair
removed - Types removed outright
Some<A>
OptionNone
EitherUnsafe<L, R>
EitherLeft<L>
EitherRight<L>
Validation<MFail, Fail, A>
Try<A>
TryOption<A>
TryAsync<A>
TryOptionAsync<A>
Result<A>
OptionalResult<A>
- Async extensions for
Option<A>
ExceptionMatch
,ExceptionMatchAsync
,ExceptionMatchOptionalAsync
- Libraries removed outright
LanguageExt.SysX
LanguageExt.CodeGen
LanguageExt.Transformers