Skip to content

Adapting to changes in C#14 (Extension Types) #792

@FreeApophis

Description

@FreeApophis

C#14 has some new features which impact Funcky in a fundamental way: we probably want to introduce new API in a 3.x Version, but I think the old API should be phased out and removed in a 4.0 Release.

Changes which might impact Funcky:

implicit and explicit extensions

ParseExtensions could be static extensions to make the Parse*OrNone functions be visible on the type.

string.ParseInt32OrNone could be int.ParseOrNone()

We could make the Asserts more discoverable by statically extend Assert in XUnit:

  • FunctionalAssert.Ok could be Assert.Ok

Sequence could be entirely done as a static extension on Enumerable.

  • We could use an explicit Some<T>-Extension-Type as an explicit type to "hide" GetOrThrow()
Some<T> some = option;
var value = some.GetOrThrow();

Let's collect the ideas for new features, adapted features and how to move on here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions