r/rust • • Nov 17 '22

What are Rust’s biggest weaknesses?

What would you say are Rust’s biggest weaknesses right now? And are they things that can be fixed in future versions do you think or is it something that could only be fixed by introducing a breaking change? Let’s say if you could create a Rust 2.0 and therefore not worry about backwards compatibility what would you do different.

220 Upvotes

390 comments sorted by

View all comments

Show parent comment

5

u/JarWarren1 Nov 17 '22

Not sure I understand. What’s the Swift behavior?

2

u/matthieum [he/him] Nov 18 '22

Swift has both methods: size_of in the size without tail-padding, stride_of is the size rounded up to alignment, to be used when iterating over an array of elements.

Not sure if they bloat structs with tail padding, but hopefully they don't have to.