On Tue, Mar 25, 2014 at 8:29 PM, Nick Cameron li...@ncameron.org wrote:
I made an RFC - https://github.com/rust-lang/rfcs/pull/20
In my half-baked opinion, it's nice to put bounds on a struct rather
than its impl(s), so that nonsensical specializations cannot be
created, rather than being
We could allow bounds to be locally inferred. E.g., `implX TX for SX
{ ... }` would infer the lub of bounds from T and S for X. But since we can
have an impl for any type, not just a struct, I think the general case
might be too tricky to do inference for. We might also want to take into
account
On 3/24/14 11:46 PM, Nick Cameron wrote:
Currently we forbid bounds on type parameters in structs, enums, and
types. So the following is illegal:
struct SX: B {
f: ~TX,
}
IIRC Haskell allows bounds on type parameters (and we did once too), but
I heard that considered deprecated and not
On Tue, Mar 25, 2014 at 6:00 PM, Patrick Walton pcwal...@mozilla.comwrote:
On 3/24/14 11:46 PM, Nick Cameron wrote:
Currently we forbid bounds on type parameters in structs, enums, and
types. So the following is illegal:
struct SX: B {
f: ~TX,
}
IIRC Haskell allows bounds on type
Thanks for the info! Sized will be going away very soon, but it will be
replaced by 'unsized' (or something with the same semantics), so we have
exactly the same question.
I don't understand the HashMap example (I'm thinking in Rust terms, and
perhaps you meant it to be a Haskell example, I'm not
The removal was in https://github.com/mozilla/rust/pull/4660, but there is
no discussion of why. Do you recall who promoted the change?
I fear it makes the syntax simpler, but the language more complex and
surprising.
On Wed, Mar 26, 2014 at 6:00 AM, Patrick Walton pcwal...@mozilla.comwrote: