Re:Some Insights from a Julia Developer
by conistonwater on Saturday October 14, 2017 @02:56PM
(#15473609)
You can click on the timestamp, and there will be a reply link there. I think reply links are hidden for a little bit of time after posting, but I'm not sure why.
This is an anti-flame war feature, designed to let people cool off before replying (fast paced discussions were often contentious before that was introduced).
Re:Some Insights from a Julia Developer
by attractivechaos on Saturday October 14, 2017 @05:31PM
(#15474425)
I guess so. This is a well thought feature. I like it.
You're not understanding generic types and its relation to (1). There's only one way to access an array: getindex. That's the function that's called with A[i]. However, you can use an immutable to put a thin (zero-cost) wrapper over an array, and define dispatches to getindex to do whatever you need it to do. So it's both implicit syntactically because the user just does A[i], but it's explicit because the user has to choose a different type. getindex is then usually inlined and then compiled according to the type, making it a thin abstraction over the implementation.
There are iterators which don't have a size or length. You can write generic algorithms which require an AbstractArray which HasLength and query at compile time for things like that and throw appropriate errors (those are called traits).
There is still a lot of development to do here, but the basics like this are pretty much solved except when new users treat Julia like MATLAB, but I'm not sure how anyone could control for that.