mojo icon indicating copy to clipboard operation
mojo copied to clipboard

[Feature Request] Remove `__and__`, `__or__` etc. from `Optional` and `OptionalReg`

Open soraros opened this issue 10 months ago • 7 comments

Review Mojo's priorities

What is your request?

As title.

What is your motivation for this change?

They correspond to & and | which I don't think anyone will (or should) use. Besides, their functionality is already covered by o and/or b where o: Optional[T] and b: Boolable.

__invert__ is also that useful, since both not o and o is not None will work.

Any other details?

__iand__ and __ior__ maybe useful as monadic operations, and I think we should add them.

soraros avatar Apr 03 '24 19:04 soraros