3 ms·
C++ actually has the same problem; you can't specify the return value of an unboxed lambda. The differences there are that C++ lets you deduce function return t
by Veedrac 9y ago
C++ actually has the same problem; you can't specify the return value of an unboxed lambda. The differences there are that C++ lets you deduce function return types since C++14, something Rust doesn't want to support, and that boxing is done through a special std::function type, rather than a normal heap pointer.
- steveklabnik 9y ago> something Rust doesn't want to support Well, in this way. "impl Trait", which was just accepted for stabilization, will let you return unboxed closures.