Skip to content

Proposal: Add void to Predef #43

@BalmungSan

Description

@BalmungSan

I have found this little helper (courtesy of Rob) to be very useful. Especially when you enable compiler options like -Wvalue-discard or -Wunused:implicits (and friends)

@inline final def void(args: Any*): Unit = (args, ())._2

While adding this into all of my projects is not really "painful" I would like if this would be part of Predef.

So I thought this would be the right place to start a discussion about if it would be worth it to add it; and if such addition could be done here until 3.1?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions