|
|
|
|
|
by Manishearth
3376 days ago
|
|
Well, I presume `String something = getSomething(); Object s = (Object)something;` would be okay. Note that in Rust we don't have inheritance (not exactly the same kind, at least), so it's rare where a statically typed value can be referred to with a different type. So there are still annoyances in Java with this approach that Rust wouldn't have. |
|