Hacker News new | past | comments | ask | show | jobs | submit login

Also R is 1 indexed instead of 0 indexed. (Arrays are numbered [1,2,3] instead of [0,1,2] for the beginner).

I forget that probably every 5 minutes when working in R.




So is Fortran, Julia, MATLAB, etc...


It's only the Jonny-come-lately languages like Algol and its descendants that are zero-based :-)


Algol, like Ada, actually requires you to specify your bounds and is perfectly happy to have 0,1,87 or -62 as your first index.


So does excel VBA.

But man, are arrays a pain in VBA.


Why do you say so? I find them pretty easy to handle. Variant arrays can be pulled and pushed straight from/to Range objects, you have LBound and Ubound to iterate over arrays if you don't feel like you can trust the base, or otherwise you have For Each. And you have Collection and Dictionary if you have different needs - you can even define a class, instance it and push to a Dictionary, now you have a key-value store full of your Object.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: