# A most harrowing collection of Julia WATs

**URL:** <https://discourse.julialang.org/t/a-most-harrowing-collection-of-julia-wats/77323>\
**Category:** General Usage\
**Tags:** wat\
**Created:** [March 2, 2022, 6:15pm UTC](https://discourse.julialang.org/t/a-most-harrowing-collection-of-julia-wats/77323 "2022-03-02T18:15:32Z")\
**Posts on this page:** 1\
**Showing post:** 89

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [January 22, 2024, 11:00am UTC](https://discourse.julialang.org/t/a-most-harrowing-collection-of-julia-wats/77323/89 "2024-01-22T11:00:30Z")

</div>

> [@Tamas\_Papp](#):
>
> Would someone kindly explain why this is?

EDIT: this is now fixed (in a PR, soon to be merged, I guess). See [Intransitivities in subtyping](https://discourse.julialang.org/t/intransitivities-in-subtyping/109266)

It’s AFAIK not possible, even in theory, to implement the subtyping (`<:`) so that it always returns `true` when a human would expect that.

The discussion in this issue is relevant: [suboptimal subtyping for `UnionAll` and `Union` · Issue #52818 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/52818)

Quoting vtjnash, emphasis mine:

> The type system is generally _permitted to return false whenever it wants to, provided only that it preserves transitivity_.

You might also be interested in the _Julia subtyping_ paper:

> _Julia Subtyping: A Rational Reconstruction_ . Proceedings of the ACM on Programming Languages, 2018, 27, ⟨ **10.1145/3276483** ⟩. ⟨ **hal-01882137** ⟩

Excerpt:

> _Unprovable judgments_. Julia’s subtype algorithm, and in turn our formalization, cannot prove all judgments expected to hold.

> [@Tamas\_Papp](#):
>
> I still don’t get it, since `Union{}` is not a valid tuple field type:
> 
> ```julia
> Tuple{Union{},Union{}}
> ERROR: Tuple field type cannot be Union{}
> 
> ```

This is actually a recent bug, introduced in v1.10, see ["Tuple field type cannot be Union{}" error in 1.10rc · Issue #52385 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/52385)

---

_[View the full topic](https://discourse.julialang.org/t/a-most-harrowing-collection-of-julia-wats/77323)._
