# Type system revision (#18457)

**URL:** https://discourse.julialang.org/t/type-system-revision-18457/512
**Category:** Internals & Design
**Created:** [November 23, 2016, 1:41am UTC](https://discourse.julialang.org/t/type-system-revision-18457/512 "2016-11-23T01:41:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)
#### Post date: [November 23, 2016, 1:41am UTC](https://discourse.julialang.org/t/type-system-revision-18457/512/1 "2016-11-23T01:41:11Z")

</div>

At JuliaCon this summer, I’d brought up an issue I’d found, where the expressions for the types of the members were evaluated when type is first created, which isn’t correct if the expressions depend on any of the TypeVars from the parameters to the type. At that time, Jeff said that yes, it could be fixed, and I’d been hoping that it would be done as part of the type system rewrite PR. However, testing it tonight, that doesn’t seem to be the case yet.

Fixing this issue can make many types a lot cleaner, where they have need to have values that are dependent on one or more parameters. For example, calculating the number of limbs needs to store a number.  
(currently, this problem is worked around by adding a bunch of extra parameters, that are calculated in the constructor, but that’s not a very clean or intuitive way of handling it.

Other than that issue still being present, the type system rewrite seems very nice!

---

<div class="post-metadata">

### Author: ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)
#### Post date: [November 23, 2016, 4:29am UTC](https://discourse.julialang.org/t/type-system-revision-18457/512/2 "2016-11-23T04:29:51Z")

</div>

As far as I know that’s still on the roadmap. It is orthogonal to the type system rewrite however, because it has no effect on subtyping or method definitions, only on the member types of fields.

---

<div class="post-metadata">

### Author: ![rleegates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rleegates/32/1029_2.png) [@rleegates](https://discourse.julialang.org/u/rleegates)
#### Post date: [April 18, 2017, 3:10pm UTC](https://discourse.julialang.org/t/type-system-revision-18457/512/3 "2017-04-18T15:10:22Z")

</div>

Has there been any progress on this issue?

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [May 17, 2017, 2:38am UTC](https://discourse.julialang.org/t/type-system-revision-18457/512/4 "2017-05-17T02:38:38Z")

</div>

Yes, the type system is fully revised in 0.6:

[https://github.com/JuliaLang/julia/pull/18457](https://github.com/JuliaLang/julia/pull/18457)

The majority of packages are updated for these changes.

---

<div class="post-metadata">

### Author: ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)
#### Post date: [May 17, 2017, 8:23am UTC](https://discourse.julialang.org/t/type-system-revision-18457/512/5 "2017-05-17T08:23:33Z")

</div>

I think @ScottPJones is talking about something along the lines of [https://github.com/JuliaLang/julia/issues/18466](https://github.com/JuliaLang/julia/issues/18466)

Recently the milestone of this was changed from 1.0 to 2.0+. So while the type system revision is awesome, for this specific feature we will have to wait a little longer.

---

<div class="post-metadata">

### Author: ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)
#### Post date: [May 17, 2017, 8:55am UTC](https://discourse.julialang.org/t/type-system-revision-18457/512/6 "2017-05-17T08:55:26Z")

</div>

Yes, that’s precisely what I’m talking about.  
I wish this were given a bit more priority, because it can make a big difference when creating types,  
and not forcing internal information to become part of the type signature (for example, the number of limbs needed to store a number of a particular precision)

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [May 17, 2017, 10:18am UTC](https://discourse.julialang.org/t/type-system-revision-18457/512/7 "2017-05-17T10:18:09Z")

</div>

I was basing my answer on the title of the thread and PR number – that feature was never slated as part of the type system revision. It still could happen in the future, but it would likely be a post-1.0 feature.
