struct Foo {
Foo() { std::cout << "Foo()" << std::endl; }
~Foo() { std::cout << "~Foo()" << std::endl; }
};
{
std::aligned_storage<sizeof(Foo),alignof(Foo)> foo;
new(&foo) Foo;
/* destructor never called even though a Foo
lives in block scope and its storage is
free'd
*/
}
C++ unions: union Foo {
Foo() { std::cout << "Foo()" << std::endl; }
~Foo() { std::cout << "~Foo()" << std::endl; }
};
{
Foo foo();
/* destructor never called */
}
Rust: struct Foo;
impl Drop for Foo {
fn drop(&mut self) {
println!("drop!");
}
}
{
let _ = std::mem::ManuallyDrop::<Foo>::new(Foo);
/* destructor never called */
}
etc.
I've upgraded its battery twice, last time this year, for 60 EUR each time, and its hitting > 9h of battery life right now.
What does seem compelling in the new Air to you?
I only see a similarly spec'ed system (Geekbench says its 40% faster): dual-core, ~same RAM, ~same HDD if I go for the 2000 EUR 512Gb SSD version, ... Retina display (this is huge), no macsafe, new keyboards (people have mixed feelings about these), ...
I find it hard to justify upgrading a system that's still working fine at such a high price tag (>2k EUR) just for a Retina display and ~30-40% faster CPU.
A modern quad/six core could deliver 4-6x speed-ups in some workflows, and discreet nvidia graphics could allow me to develop for CUDA, 1Tb SSD would be nice, etc. I could justify paying 2000 EUR for all these upgrades on top of a Retina display. But just for a retina display? I'd rather go skiing in the Alps for two weeks this winter for 1600 EUR and just buy an apple watch with the remaining 400 EUR =/