6 ms·
I really like Julia despite the criticisms. I think the problem is that it's still a young project that needs more core developers to help maintain it. I find
by Xcelerate 12y ago
I really like Julia despite the criticisms. I think the problem is that it's still a young project that needs more core developers to help maintain it.
I find bugs and unintuitive behavior a lot when using Julia. Often it requires me searching the mailing list or Stack Overflow to figure out "idiomatic" Julia code when this really should be in the documentation (who knew that a matrix operation A += B allocates new memory for A each time?) And I think global variables should just be removed altogether, as many problems as they cause. I commonly find myself thinking "There's no way that someone new to Julia would know you're supposed to do it this way", whereas with Python or even C, that's not the case.
But I think the language has a lot of promise, and the language design is really slick and well put together: powerful macros, a nice type system, multiple dispatch, clean code when you don't need performance but lots of additional decorations you can add when you do (devectorization, @parallel, @inbounds, @simd, type annotations).
Remember that Julia is only at dev version 0.4. The author of the article complains about breaking backwards compatibility on an almost daily basis by removing or changing things. At this early stage, I see absolutely nothing wrong with this. I'm tired of languages that have unintuitive and quirky (stupid) ways of doing things just in order to not break existing code. C++, for instance, is abhorrent to me. How many pages is the standard??
At the moment, Julia has a steep learning curve if you want high-performance code. But once you know what you're doing, it's easy to get it running at the level of C. Plus, features like viewing the AST, or the LLVM and native assembly representation of the code are handy for debugging.
- bazookajoes 12y ago> And I think global variables should just be removed altogether, as many problems as they cause. Hi, I'm curious what your thinking is? Is it because global variables make testing hard? Is it because global variables are can not be optimized well? Is it because of bugs in julia related to global variables? I would like to use a language that doesn't have static variables, global variables, or static functions to make writing tests easier, but that makes it really hard to interface with C and the JVM. I often need functions like write() and System.out.print.
- Xcelerate 12y ago> Is it because global variables are can not be optimized well? Is it because of bugs in Julia related to global variables? Mainly this; it's incredibly easy to accidentally use global variables and swamp your whole program. Think about defining some constant "n" in the global space and forgetting to put "const" in front of it. Then any for loops that use "for i = 1:n" will reallocate n on every iteration. If it's a nested loop, you'll get huge accidental memory allocations (this particular problem [not mine] is one on Stack Overflow that took a while to debug). It's the same reason garbage collection is used; it's not strictly necessary but it prevents a lot of accidental bugs and makes programs easier to reason about. I think it would be the same with removing global variables. * Of course, you still want function names to be global, so perhaps define a namespace that you can dump immutable functions or constants into. Or if there's good reasons not to remove global variables, at least make them all const by default and add a "mutable" keyword (and maybe swap that in the REPL). This would at least remove most of the accidental bugs.