|
|
|
|
|
by tylerhou
2964 days ago
|
|
I think because returning two different types requires dynamic dispatch when using the returned objects, which requires Box; if the function only returns one type then that type can be determined at runtime and further function calls can be implemented with static dispatch instead. |
|