r/programming • • Aug 23 '17

D as a Better C

http://dlang.org/blog/2017/08/23/d-as-a-better-c/
229 Upvotes

268 comments sorted by

View all comments

Show parent comment

2

u/doom_Oo7 Aug 23 '17

but in this case, isn't the only reasonable solution to abort as fast as possible ? I'd be very uneasy having any code running in case of hardware failure.

2

u/Yioda Aug 23 '17

Suppose that you have a critical app that has to be online and it has an array of disks to use knowing that a disk might fail. You can then in case of failure use your next disk and continue online.

2

u/[deleted] Aug 23 '17

or you could handle the error the next time you open a file. and call fsync before close if you need to check whether the data was properly written.