|
|
|
|
|
by gameswithgo
1466 days ago
|
|
I really enjoy some of the optimization details like when the memory overhead of Option<> can be elided completely. Other languages with Options will actually toss data up on the heap that doesn't need to be because it is in a Option and, or at the very least always take up a byte with the tag. Details like this let you use the safer and more ergonomic solutions by default rather than having to worry if they are worth the overhead. |
|
You can do a lot of this in languages like C++ but there are some pernicious limits that Rust didn't have e.g. C++ can't conceive of Zero Size Types.