>>107567040
>but rust doesn’t have much support built in the language but it is done through cargo
i mean, generics are still builtin, and the std has most types collection you'd need, ie hashmap<T>, Vec<T>
but yea, a lot of the good stuff is available through cargo, the ecosystem is indeed realy good imo.
though i think a lot of the libraries can be made possible only thanks to the language's flexibility and also that it's not a pita to use someone else's code.
the biggest example of it is traits imo, since trait implementation is separate from type definition, that means you can implement your own traits to library / extrenal types and library traits to your own type.
that also means library can write functions expecting a type to implement a trait, but more importantly that means library A can define a trait, and library B that's independent from A can expect this trait.
and then you can just make a library C that implements library A's trait, and now everyone that uses library A can use your library C even if you never even knew about B's existance.
that's allow us to do
derive(Serialize, Deserialize)
struct foo { whatever}
and now your type can be converted to any known format know to man through third party libs that implement serializers/deserializers.
Comment too long. Click here to view the full text.