3 ms·
Well, my comment stems from a very superficial overview of the language and some libraries. Perhaps I'm wrong. But I haven't seen any heavy usage of high-order
by nextos 13y ago
Well, my comment stems from a very superficial overview of the language and some libraries. Perhaps I'm wrong. But I haven't seen any heavy usage of high-order functions or lazy data structures, and this worries me.
I don't just want a fast MATLAB replacement. I want a fully-fledged multi-paradigm programming language.
- StefanKarpinski 13y agoYou're right that there isn't a particularly strong emphasis on lazy data structures or higher-order programming in Julia's base library. They are, however, both well supported and higher-order functions in particular are used in many places; Julia uses Ruby-style do blocks all over the place, and a lot of macros desugar to functional constructs. However, Julia's primary paradigm is multiple dispatch. For more details on that, you can check out this presentation I gave at Strange Loop this year: http://nbviewer.ipython.org/gist/StefanKarpinski/b8fe9dbb36c1427b9f22 http://nbviewer.ipython.org/gist/StefanKarpinski/b8fe9dbb36c... Functional style isn't something to embrace for its own sake. Lazy data structures, in particular, while elegant, require a very sophisticated compiler in order to have even remotely decent performance. Even with a sufficiently clever compiler, the performance characteristics of the resulting code tend to be extremely opaque and difficult to reason about. That said, sometimes it's a nice way to express things and it's quite possible to implement lazy data structures in Julia: see, for example, the Lazy [1] and LazySequences [2] packages. [1] https://github.com/one-more-minute/Lazy.jl https://github.com/one-more-minute/Lazy.jl [2] https://github.com/dcjones/LazySequences.jl https://github.com/dcjones/LazySequences.jl