On Sunday, April 29, 2012, Gareth Smith wrote:
>
> Hi,
>
> I have written up some thoughts about a enabling a less repetitious API
> for constructing hashmaps (amongst other possibilities), here:
> https://github.com/mozilla/**rust/wiki/Bikeshed-impl-**method-extraction<https://github.com/mozilla/rust/wiki/Bikeshed-impl-method-extraction>
>
> Does this make any sense?
Couldn't you just do something like:
fn hashmap <K:hash equals copy, V:copy> () -> std::map::hashmap<K, V> {
ret std::map::hashmap({|k| k.hash()}, {|k1,k2| k1.equals(k2)});
}
?
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev