In a rather disruptive, but I think worthwhile, change, we now have different keywords for defining types. Here’s a quick summary:

immutable changes to struct

changes to type changes to mutable struct

changes to abstract changes to abstract type ... end

changes to bitstype 32 Char changes to primitive type Char 32 end

The PR that did this: https://github.com/JuliaLang/julia/pull/20418

Kristoffer has a helpful script for the struct part of the change here: https://github.com/JuliaLang/julia/pull/20418#issuecomment-277201589

Hopefully it can be extended to handle abstract and primitive as well.

For now, type and immutable are still allowed without a deprecation warning, since Compat.jl won’t be able to support the new syntax.

Using type ... end allows Compat to support the new abstract & primitive type syntax, and also allows us future flexibility to add things inside such definitions. The extra verbosity is considered tolerable since these keywords are used much less often than the struct keywords. It also means that in 1.0, the words abstract , type , immutable , mutable , and primitive will be usable as normal identifiers. The only type-related word that will actually be reserved is struct .

This change allows us to use clearer terminology, where keywords correspond to descriptive terms where applicable:

primitive type: a scalar-like type that’s just a series of bits, no fields

struct: data consisting of named fields

(im)mutable type: a type that can or can’t be mutated

bits type: pointer-free, immutable data (might be either struct or primitive)

type: something that describes a class of values

The preferred default user-defined type is struct . No more telling people to go through and make everything immutable for performance

-Jeff