Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm using this technique in a compiler [1]. One thing I really like about it is that, unlike pointers, I can reuse the integer indices (`ExprRef` in the article) between arrays. So, for example, I have separate arrays for the AST and computed types, which allows the AST to be immutable. (perhaps the article already mentions this advantage, but I didn't see it in the list of advantages)

[1] https://github.com/audulus/lyte



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

Search: