September 26

By: This week in julia

Re-posted from:

There’s been some very exciting changes in Julia 0.4-dev this week. Some highlights:

Core infrastructure

  • Staged functions! #7311 These powerful function generators are somewhat like macros, only they operate on types instead of syntax. Whereas macros just give you the symbols of the arguments, staged functions run at a slightly later stage in the compilation process where you can get the types of the arguments. See Jeff’s writeup from when he proposed them two years ago on the mailing list. These are required for @Keno’s Cxx.jl package, and I see it as a very important stepping stone towards bigger and better features (including Keno’s debugger!). There’s still an open discussion about the naming, perhaps changing it to something like type function.

  • Meta expressions and @inline #8297. Force methods to always be inlined with @inline function foo() = …. This feature is now nicely documented in the new talking to the compiler chapter. I think this can eventually be extended to call site inlining, too, but that hasn’t been implemented yet.

  • A new parametric Nullable{T} type #8152. The nullable type is a specialized container that can have zero or one objects. See the new documentation in the Representing Missingness chapter. I believe the long-term plan will be to migrate DataArrays to using these types for their missingness, allowing for more performant, type-stable code (currently, many DataArray operations return something of type Union(Something, NAType)… which the compiler is unable to optimize).

  • @simd just got faster! I don’t fully understand this one, but check out #8452, where Arch enabled 64-bit vectorization.


  • The REPL keymap infrastructure was overhauled, making it easier and more powerful to create custom keybindings. See the documentation here: Customizing keybindings. You can now use Matlab-style up- and down-arrow history completions! There are still some bugs to be ironed out, but it’s looking really good.


  • Jeff has been working on the much desired integer promotion change — currently, Int8(1) + Int8(2) yields a 64 bit 3. #8420 will change it so integer arithmetic is type-preserving. It also checks integer truncations and signed-unsigned conversions. It’s looking like it’ll get merged very soon!

Package ecosystem

  • Jiahao created an automatic script to show what’s been going on in the METADATA.jl repository. See the Google groups discussion, or simply jump to its output here

Did I miss anything?