# N-bit Integers in Julia

**URL:** <https://discourse.julialang.org/t/n-bit-integers-in-julia/94861>\
**Category:** Internals & Design\
**Tags:** bitint\
**Created:** [February 19, 2023, 3:39am UTC](https://discourse.julialang.org/t/n-bit-integers-in-julia/94861 "2023-02-19T03:39:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![melonedo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/melonedo/32/15503_2.png) [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Post date:** [February 19, 2023, 5:53am UTC](https://discourse.julialang.org/t/n-bit-integers-in-julia/94861/4 "2023-02-19T05:53:47Z")

</div>

> [LLVM supports arbitrary N-bit signed and unsigned integers](https://llvm.org/docs/LangRef.html#integer-type). The question then is why doesn’t Julia support these types?

Only things that **have to** be in the language are added to the language. The easiness of that is not a reason to add it, for example [supporting a piping syntax to Julia](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue/89654) is easy enough, but it becomes very, very contentious when one wants it in Julia itself.

From [#35526](https://github.com/JuliaLang/julia/pull/35526), `primitive type` is considered leaky implementation detail, thus discouraged to be used by language users. Its existence is only justified by the limitation of current Julia implementation. Arbitrary integer types, on the other hand, does not have any problem residing in a package. Supporting it in Julia will incur a lot of discussions: what will be its representation, what about its alignment, will it save space when stored in an array, how do we infer arbitrary but limited precision integers?

---

_[View the full topic](https://discourse.julialang.org/t/n-bit-integers-in-julia/94861)._
