Hacker News new | ask | show | jobs
by zimablue 2672 days ago
THanks for a serious reply. The cached function computation argument is an interesting one, which resembles the answer by evanb here https://mathematica.stackexchange.com/questions/86189/why-do...

I hadn't seen it before, basically if I understand it right treating all vectors as lisp s-exps which are themselves 0-indexed (0th element is 'list' , because you're doing a lot of symbolic manipulation. It's the best argument I've seen for 1-indexing, I'd say two criticisms - 1: I don't know how homoiconic Julia is, if it's not very then the actual use of this seems very low relative to slicing. 2: It seems to be mixing up indexing a vector itself, and indexing the expression that the vector is (like macro-quoted vs unquoted). I can see how it would smooth things in some way but it feels like a fudge that might cause more pain somehow later.

1 comments

No, IIUC, my explanation is nothing like what's mentioned in that comment. I'm trying to argue that it behooves us to use indices which conveniently model the problem domain, not some holy system where the head always starts with zero. I gave several examples to the effect, where zero based, one based, or different offset indexing makes sense. If you're really curious to continue the discussion, feel free to reach out via email (refer my profile). This thread is become unwieldy.