# History Lesson Required About Type,Immutable,Struct, Mutable Struct

**URL:** <https://discourse.julialang.org/t/history-lesson-required-about-type-immutable-struct-mutable-struct/8021>\
**Category:** General Usage\
**Created:** [December 27, 2017, 7:37am UTC](https://discourse.julialang.org/t/history-lesson-required-about-type-immutable-struct-mutable-struct/8021 "2017-12-27T07:37:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qiyamah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qiyamah/32/2660_2.png) [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Post date:** [December 27, 2017, 7:37am UTC](https://discourse.julialang.org/t/history-lesson-required-about-type-immutable-struct-mutable-struct/8021/1 "2017-12-27T07:37:02Z")

</div>

Hi,

I want to have a history lesson from a julia historian.

type X  
end

struct X  
end

mutable X  
end

immutable X  
end

what are the differences?  
and how it appeared through the history.  
Thanks

---

<div class="post-metadata">

**Author:** ![innerlee](https://avatars.discourse-cdn.com/v4/letter/i/b19c9b/32.png) [@innerlee](https://discourse.julialang.org/u/innerlee)\
**Post date:** [December 27, 2017, 7:44am UTC](https://discourse.julialang.org/t/history-lesson-required-about-type-immutable-struct-mutable-struct/8021/2 "2017-12-27T07:44:30Z")

</div>

The history can be digged up through github issues/prs?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 27, 2017, 7:48am UTC](https://discourse.julialang.org/t/history-lesson-required-about-type-immutable-struct-mutable-struct/8021/3 "2017-12-27T07:48:31Z")

</div>

You may find the `v0.6.0` release notes useful, particularly the [Language changes](https://github.com/JuliaLang/julia/blob/v0.6.0/NEWS.md#language-changes) section.

In general, release notes are a good place to start for history, since they link the PRs and issues, which have the discussion (or links to more discussion 😉). You can view them easily using the “switch branches/tags” button on Github.

---

<div class="post-metadata">

**Author:** ![swissr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swissr/32/208_2.png) [@swissr](https://discourse.julialang.org/u/swissr)\
**Post date:** [December 27, 2017, 9:20am UTC](https://discourse.julialang.org/t/history-lesson-required-about-type-immutable-struct-mutable-struct/8021/4 "2017-12-27T09:20:33Z")

</div>

In the beginning there was only one [composite type](https://en.wikipedia.org/wiki/Composite_data_type) and it has been named: `type`. In Julia version 0.2 `immutable` (`immutable type`) has been added.

I imagine, naming is difficult: you have a `mutable struct type` and an `immutable struct type`. But you cannot force people to spell it out in full and the question is, how to shorten it?

The original choice, `type`, has been found to be too generic. In a long winded but interesting [issue](https://github.com/JuliaLang/julia/issues/19157) the current names have been choosen:

```
type X .. end --> mutable struct X .. end
immutable X .. end --> struct X .. end

```

As mentioned, the [v0.6 NEWS](https://github.com/JuliaLang/julia/blob/release-0.6/NEWS.md#language-changes) is interesting. For (mutable) struct differences check out the [manual](https://docs.julialang.org/en/stable/manual/types/#Composite-Types-1). As your question is about types you might be interested in the ‘The state of the Type System’ talk by Jeff Bezanson (youtube, see e.g. at around 02:45).
