Sgt_choke_n_stroke@lemmy.world to Programmer Humor@programming.dev · 11 months agoThe temptation is always therelemmy.worldimagemessage-square74fedilinkarrow-up1995arrow-down138
arrow-up1957arrow-down1imageThe temptation is always therelemmy.worldSgt_choke_n_stroke@lemmy.world to Programmer Humor@programming.dev · 11 months agomessage-square74fedilink
minus-squareEufalconimorph@discuss.tchncs.delinkfedilinkarrow-up3·edit-211 months agoint const golden = 1.618; int* non_constant = (int*)&golden; golden = 1.61803399; Casts are totally not a danger that should require a comment explaining safety…
Or mutable constants…
int const golden = 1.618; int* non_constant = (int*)&golden; golden = 1.61803399;
Casts are totally not a danger that should require a comment explaining safety…