Skip to content

[Feature]: Remove redundant TCurrent generic from Stream #185

Description

@eneshoxha

Note

This will be a breaking change

StreamBuilder<TIn, TCurrent> and other Streams carry two generic parameters, but TCurrent is effectively “the current stream element type” and is already represented by the builder instance’s type. In practice, TIn is only needed for the initial stream/root input, while TCurrent is re-declared and threaded through many interfaces and builders, increasing API surface and cognitive load without adding real value.

Goal
Simplify the public API by removing TCurrent where it is redundant, while keeping fluent chaining and type-safety (the “current type” should be the builder’s single generic type).

var stream =
    StreamBuilder<MyInput>.CreateNewStream("my-stream")
        .Stream() // or .Stream(source)
        .Map(x => ...)
        .Filter(x => ...)
        .GroupBy(...)
        .Sink(x => ...)
        .Build();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfeatureThis label is in use for minor version increments

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions