Jaromil to Programmer [email protected] • 3 months agoOff by one solitudefed.dyne.orgimagemessage-square141fedilinkarrow-up11.49Karrow-down125
arrow-up11.47Karrow-down1imageOff by one solitudefed.dyne.orgJaromil to Programmer [email protected] • 3 months agomessage-square141fedilink
minus-square@dohpaz42linkEnglish10•3 months agoThe problem is that they both are contextual and can mean any position in a list/array. The starting index or starting offset is generally zero, but could be one, depending on the language used.
minus-square@affiliatelink4•3 months agoi wonder why people haven’t made a language that starts indexing at 2 yet. maybe some day
minus-square@[email protected]linkfedilinkEnglish2•3 months agoDreamberd starts array indexing at -1 instead of 0 or 1. https://github.com/TodePond/DreamBerd
The problem is that they both are contextual and can mean any position in a list/array. The starting index or starting offset is generally zero, but could be one, depending on the language used.
i wonder why people haven’t made a language that starts indexing at 2 yet. maybe some day
Maybe this could be a feature in brainfuck or COBOL.
god i hope so
Dreamberd starts array indexing at -1 instead of 0 or 1.
https://github.com/TodePond/DreamBerd
what a beautiful language