An unofficial, read-only Hacker News reader.

In C++, = default and {} are not the same constructor (opens external site)

130 points by surprisetalk 3 days ago | lemire.me | 198 comments on HN

View full thread · View on Hacker News

Comment thread (1)

  1. For some reason both c++ and rust decided to go with "lets make temporaries have insanely short lifetimes! Kill them immediatly at the first semicolon we can!" and I don't know why. (rust at least makes it a compiler error to misuse them, but still annoying.)

    C has a much better design with its compound literals having block scope lifetimes.