CodyIT@programming.dev to Programmer Humor@programming.devEnglish · 10 days agoUnexpected Spanish Inquisitionprogramming.devimagemessage-square8linkfedilinkarrow-up1517arrow-down18
arrow-up1509arrow-down1imageUnexpected Spanish Inquisitionprogramming.devCodyIT@programming.dev to Programmer Humor@programming.devEnglish · 10 days agomessage-square8linkfedilink
minus-squaretetris11@feddit.uklinkfedilinkEnglisharrow-up8·9 days agomake([] [] byte, 0) Does this make a double nested byte array of size 0? As in, every element is made up of two iterators (adjacent cell, and then the nested cell), but the first element doesnt exist yet?
minus-squareEntirelyUnlovable@lemmy.worldlinkfedilinkarrow-up12·9 days agoThis looks like Go, so I think this would be a 2d array (or slice as Go calls it) of bytes, with starting length 0. Go has an optional 3rd parameter for capacity
minus-squaretetris11@feddit.uklinkfedilinkEnglisharrow-up3·9 days agoInteresting, thanks! I find it weird for it to be assigned to a buffer variable if no initial fixed size is given
make([] [] byte, 0)Does this make a double nested byte array of size 0?
As in, every element is made up of two iterators (adjacent cell, and then the nested cell), but the first element doesnt exist yet?
This looks like Go, so I think this would be a 2d array (or slice as Go calls it) of bytes, with starting length 0. Go has an optional 3rd parameter for capacity
Interesting, thanks! I find it weird for it to be assigned to a buffer variable if no initial fixed size is given