Oh yes, and one more:

* Why does the do-notation require a function that takes a proc()?  Given
that || is the recommended type for HOFs it seems like it would be much
more convenient if it worked with functions expecting a proc() or a ||.


On Sun, Jan 12, 2014 at 8:09 AM, Abraham Egnor <[email protected]> wrote:

> Hello!  The 0.9 release prompted me to poke at my nascent rust code.  Very
> impressed with the language and the progress since I last looked (0.4
> maybe?).
>
> Some questions that I wasn't able to find answers for:
>
> * Is there any built-in way to iterate over all values of a C-like enum?
>  It's not hard to define an iterator method that implements this for any
> given type, but it's tedious boilerplate that seems better left to the
> compiler.
>
> * Is it possible to express "if a type implements trait A, here is a
> default implementation of trait B"?  I tried the obvious way ("impl<T:
> TraitA> TraitB for T"), but it looks like the rust compiler can't
> disambiguate between that impl and type-specific impls.
>
> Thanks!
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to