or what's the differents between theese two:
void transactionalCreate(string filename) {
string tempFilename = filename - ".fragment";
scope(success) {
std.file.rename(tempFilename, filename);
}
auto f = File(tempFilename, "w");
}
and:
void transactionalCreate(string filename) {
string tempFilename = filename - ".fragment";
auto f = File(tempFilename, "w");
std.file.rename(tempFilename, filename);
}
- Why we need scope(success) if I can write at the end? tamir
- Re: Why we need scope(success) if I can write at... spir
- Re: Why we need scope(success) if I can write at... Steven Schveighoffer
- Re: Why we need scope(success) if I can write at... Jonathan M Davis
- Re: Why we need scope(success) if I can writ... Andrej Mitrovic
- Re: Why we need scope(success) if I can ... Jonathan M Davis
- Re: Why we need scope(success) if I can writ... spir
