[<<][rust][>>][..]
Mon Feb 2 17:11:11 EST 2015

traits

So basically it seems that a lot of programming in rust needs
generics.  Even for simple callbacks it's necessary to implement
behavior as a trait or resort to trait objects, delegating type
dispatch to run time.

Two points where this gets a little annoying:

- Iterators

- Closures: Fn / FnMut


Traits seem to work due to the interplay of parameterized structs and
constraints on the trait and implementation.  Elaborate.



[Reply][About]
[<<][rust][>>][..]