5 ms·
Just because a type can be named doesn't mean that returning the named type properly expresses your intent. The name of said type can get real hairy real fast,
by rabidferret 10y ago
Just because a type can be named doesn't mean that returning the named type properly expresses your intent.
The name of said type can get real hairy real fast, as well.
- Manishearth 10y agoRight, but in most cases returning a named type is fine. Usually with futures/iterators I've seen that you end up returning a new custom type that implements the trait, and often it's okay to just name it.
- rabidferret 10y agoI think that's only the case when you are specifically trying to avoid boxing.