← Top stories In C++, = default and {} are not the same constructor ↗ (opens external site) 129 points by surprisetalk 2 days ago | lemire.me | 198 comments on HN ↗ View full thread · View on Hacker News Comment thread (1) tialaramex | 2 days ago | parent | reply Yes, the ergonomics are just betterIf you Vec::with_capacity(5) both you and a reviewer know what's going on here - this is clearly a Vec with capacity 5.When you call a C++ constructor with 5 as the parameter, both you and the reviewer had better be sure what that 5 means.
If you Vec::with_capacity(5) both you and a reviewer know what's going on here - this is clearly a Vec with capacity 5.
When you call a C++ constructor with 5 as the parameter, both you and the reviewer had better be sure what that 5 means.