gw
Joined 16 years ago
Karma
2,042
Submissions
269
Member since
Aug 26
Joined 16 years ago
// option 1
try {
fp = os.open(x)
fp.read()
}
finally {
fp.close()
}
// option 2
fp = os.open(x)
try {
fp.read()
}
finally {
fp.close()
}
Should we close if open fails? Maybe, maybe not, but with try/finally it is obvious which one it is doing.https://www.youtube.com/watch?v=zA_0_dSD3-Q&t=27m35s
Crawford definitely is not doing enough introspection. I hope the man resets and makes an inspiring project without the self-romanticizing or self-pitying.