Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
barpet
· 10y ago · 0 comments
no reason imho..the function is pretty trivial. But also not a reason not to use it as a performance impact would be minimal :-)
Comments
[–]
junke
10y ago
The behavior is different if a panic occurs, isn't it? But is there any chance that this particular initialization code might panic in the first place?
[–]
schmichael
10y ago
Given the current code and no races against the values being initialized: no, there is no chance for a panic.
[–]
alpb
10y ago
This is not a good assumption. The code will panic, for instance when it can't allocate memory, or runs into signal handling issues.
[–]
nabucodonosor
10y ago
understood. thank you.