3 ms·
>However, not syntactically distinguishing array indexing from function calls has problems in a language that provides as much array functionality as Julia does
by ChrisRackauckas 8y ago
>However, not syntactically distinguishing array indexing from function calls has problems in a language that provides as much array functionality as Julia does.
The best example is probably the differential equation solution type in Julia. When you have a solution `sol`, the interface gives you `sol[i]` as the values in the solution's time series and `sol(t)` the continuous solution of the differential equation. This are natural ways to describe both the discrete array-like and continuous function-like nature of an ODE's numerical solution, and that syntax wouldn't be possible without distinguishing a function call from indexing.