Skip to content

API design improvement proposal: overload all methods #19

@mleg

Description

@mleg

Found annoying to figure out each time which method to use. I'm not very good at rememebering all Java functional interfaces.

Proposal:

Give all Sneaky class methods same name (unchecked for example) thus overloading them.
Instead of writing

myStream.forEach(Sneaky.consumer(lambda));

it would look like

myStream.forEach(unchecked(lambda));

Notice static import now is more sensible.
Also it helps with refactoring when lambda signature changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions