Updated: There is a new-prelude RFC in which the author proposes not to add Not
trait to the prelude but favors the approach described here.
This RFC proposes adding inherent .not()
method to bool
type that matches the behavior of logical negation operation !bool
.
Please read more on HackMD: https://hackmd.io/@lzutao/r1Mzcx-eO.
Everyone feels free to comment here or on the HackMD link above. You could make changes to the RFC while sign-in (with GitHub ID or so) in the above link.
P/S: I am not a native English speaker nor a good writer. So please bear with me.
cc The is_not_empty() method as more clearly alternative for !is_empty()