13
cbsa
6y

OMG, R programming language's index starts from 1.... #SHOCKED

Comments
  • 3
  • 1
    I'm rocked
  • 1
  • 2
    As the R language is inconsistent af when it comes to packages I believe that there are R packages that start from 0
  • 4
    Matlab too
  • 4
    Risky question of the day: why shouldn't it? I do know assembly and C and know how its represented under the hood but I'd prefer not having to do the whole lenght-1 thing. I think it would be more programmer friendly if it was abstracted away.
  • 5
    Julia too. I just discussed about it yesterday. But on average... those who use these data science-oriented programming languages ​​are not computer scientists, but scientists or mathematicians. It is easier for them to understand that the first element of an array a is actually the number 1. Do you remember the first day of programming when they told you that the first element of an array was 0? It was strange... now you've a habit, but if you think in an other perspective, it makes sense that element 0 of an array is the number 1
  • 1
    @musician yeah exactly
  • 1
    R is a complete mess, so no surprise there
Add Comment