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

The issue is that there is no way to verify if OOB access is possible given an abstract type, unless you know how that type behaves, i.e. how it's indexed.

And Julia provides no way of specifying the behaviour of abstract types.



> And Julia provides no way of specifying the behaviour of abstract types.

I'm not sure if "no way" is accurate. There are interfaces and one could use traits. As cited above, we could use `eachindex` or `CartesianIndices` to get a list of the valid indices. The problem is enforcing and testing these interfaces.


There are no interfaces in Julia. There is simply documentation, and the hope that people will read, understand, and follow it.




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

Search: