Rust vs Go new thread

the first thread was in

Attached: 1*ktpi_k09hWB5RaSRK1a-9A.png (1600x694, 1.62M)

Other urls found in this thread:

benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/rust-go.html
techempower.com/benchmarks/#section=test&runid=019d5c9b-823f-4890-8ed9-28c0a2718bdd&hw=ph&test=json&l=yykewt-f
rust-lang.org/production/users
youtube.com/watch?v=0IMe7C5y3PU
twitter.com/SFWRedditVideos

Reminder that node.js bootcamp babies can fuck off

I agree, the same for goshit low IQ retards like you

only low IQ here is you, webshit baby

both are gay languages, learn a real language you nancy

not true, I design floating-point units for a living, unlike you, 5$/hour upwork retard

...

Having worked with Rust for quite some time, trait objects are quite literally useless. At least in go you can object.(Interface) or object.(Type) to 'get it back out'.
In Rust, once you have a Box it's stuck there. You're limited to only the functions of Trait, you cannot specify additional traits ala Box, and you cannot get it back out back to its original type unless you use Box, which elides ALL type information, meaning you cannot perform operations on it - and you can only get back the original, concrete type (if you know it in the first place, which largely limits its use again).

Is it possible to make your trait inherit Any? But yes, you're right. Rust trait objects are pretty terrible. Type assertions for trait objects should be pretty easy to figure out even without Any.

>Is it possible to make your trait inherit Any?
Any is implicitly implemented for everything. What one needs is specifically an Any trait object, not any trait object that implements Any.
In order to downcast you need specifically Box, &Any, or &mut Any.