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

You can't make the language 0 based, that would indeed be a terrible idea. Instead, you can make array types which have whatever indexing behaviour you like.

Because of the focus on generic code, these custom array types are basically first class citizens. See for example https://github.com/JuliaArrays/OffsetArrays.jl

Almost every serious julia package is written in such a way that they can handle such arrays correctly.



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

Search: