HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-23 months agoWhy make it complicated?lemmy.mlimagemessage-square22linkfedilinkarrow-up1152arrow-down111file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1141arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-23 months agomessage-square22linkfedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squareDreamButt@lemmy.worldlinkfedilinkEnglisharrow-up12·edit-23 months agoBecause sometimes that let can be replaced by other things like const. Which can be managed statically by the machine and not by my (imperfect) ability to know if it’s mutated or not
minus-squarelobut@lemmy.calinkfedilinkarrow-up2·3 months agoI think you can do const thing = ... as constto lock down the mutation?
Because sometimes that
let
can be replaced by other things likeconst
. Which can be managed statically by the machine and not by my (imperfect) ability to know if it’s mutated or notI think you can do
const thing = ... as const
to lock down the mutation?