# Type domain (static) integers

**URL:** <https://discourse.julialang.org/t/type-domain-static-integers/118568>\
**Category:** Internals & Design\
**Tags:** discussion, integer\
**Created:** [August 24, 2024, 4:52pm UTC](https://discourse.julialang.org/t/type-domain-static-integers/118568 "2024-08-24T16:52:11Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![sadish-d](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sadish-d/32/48058_2.png) [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Post date:** [September 2, 2024, 4:19am UTC](https://discourse.julialang.org/t/type-domain-static-integers/118568/28 "2024-09-02T04:19:21Z")

</div>

I don’t have much to add but was reading through a bit of `Static.jl` and saw this, in case people find it relevant.

@nsajko said “having [type domain integers] outside of Base means it’s not available for improving Base, not without type piracy”.

`Static.jl` has this:

```julia
const IntType = Union{StaticInt, Int}
IntType(x::Integer) = Int(x)

```

`Union{StaticInt, Int}` is an instance of `Type{Union{StaticInt, Int}}`, which does not “belong to” `Static.jl` even if `StaticInt` does. `Integer` doesn’t belong to `Static.jl`. I could be wrong, but I think `IntType(x::Integer) = Int(x)` constitutes type piracy. Previous discussion here: [Is dispatch on another type's parameter (::NotMyType{MyType}) piracy?](https://discourse.julialang.org/t/is-dispatch-on-another-types-parameter-notmytype-mytype-piracy/110797)

---

_[View the full topic](https://discourse.julialang.org/t/type-domain-static-integers/118568)._
