On 13 Jan 2014, at 12:34 am, Owen Shepherd <[email protected]> wrote:
> But I also feel that by making the unchecked ones the shorter name, the
> language would be implicitly sending a message that they're preferred.
Custom operator time!
Say hello to our checked operators:
trait CheckedAdd {
fn infix +| (a: &Self, b: &Self) -> Self;
}
trait CheckedSub {
fn infix -| (a: &Self, b: &Self) -> Self;
}
trait CheckedMul {
fn infix *| (a: &Self, b: &Self) -> Self;
}
xD
~Brendan
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev