Jeff Burdges

Results 808 comments of Jeff Burdges

Adding traits sounds unnecessarily confusing and hierarchical. And maybe breaking. Could `const` members address this? And avoid breakage via default values? ``` pub trait From { fn from(T) -> Self;...

I think `const INJECTIVE: Option = None;` keeps existing `impl From for ..` code correct by not specifying either true or false incorrectly. I donno if `SURJECTIVE` helps, maybe not.

We do nee a default regardless. I suppose you're saying `const INJECTIVE: bool = false;` can be the default because code should never use `U: From`? Fine. If you want...

I imagined the coherence rules isolated any breakage when adding a default constant, but.. I suppose you're talking about how the trickier coherence rules around the existing type parameter, yes?...

I'd personally prefer if std kept few distinctive names for expensive operations, so a method that clones an array should never be called just `sorted`, maybe `to_owned_and_sorted`. It's clearer to...

``` pub trait Borrow { fn borrow(&self) -> &Borrowed; fn apply_ref(self, impl FnOnce(&Borrowed)) -> Self where Self: Sized { f(self.borrow()); self } } pub trait BorrowMut: Borrow { fn borrow_mut(&mut...

If you've `v: [T; N]` then these correctly return another `[T; N]`: ``` g(v.apply_to_clone(::sort_unstable)) let f = |s| s.sort_by_key(...); g(v.apply_to_clone(f)) ``` If you add all six `sorted*` methods to `&[_]`...

Awfully disruptive change here. We do indexing & iterating all the time, so even mild hiccups create chaos. It's conversely relatively rare range types appear inside a `Copy` type. We'll...

`IntoIterator` is often either not used or unusable. ``` fn foo(i: &mut I) fn bar(i: &mut I) where for

I think CT winds up much less fragile than CAs do. If git used sha256 then you gain pretty powerful forensic tools from repository history plus git hashes in the...