# Internals & Design

**URL:** https://discourse.julialang.org/c/dev/5.md?page=11

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 12

---

## [Should Any have an identity constructor method?](https://discourse.julialang.org/t/should-any-have-an-identity-constructor-method/109500)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 10\
**Last updated:** [January 31, 2024, 10:31am UTC](https://discourse.julialang.org/t/should-any-have-an-identity-constructor-method/109500 "2024-01-31T10:31:00Z")

</div>

Many non-concrete types have constructors, for example we have AbstractFloat(0.3) == 0.3 and Union{Int,Float64}(0.3) == 0.3. Should we also have a method like Any(x) = x? Then we would have map(Any, \[3,4,5\]) == map(ident…

---

## [Plans for static compiled binaries?](https://discourse.julialang.org/t/plans-for-static-compiled-binaries/107413)

<div class="topic-metadata">

**Author:** [@Mateusz\_K](https://discourse.julialang.org/u/Mateusz_K)\
**Replies:** 13\
**Last updated:** [January 29, 2024, 7:44pm UTC](https://discourse.julialang.org/t/plans-for-static-compiled-binaries/107413 "2024-01-29T19:44:43Z")

</div>

Dear Julia Developers, Is static compilation currently on the development roadmap for Julia? Any information on its progress or plans would be appreciated. I am asking this because my use case is typically delivering b…

---

## [Building Julia with the latest LLVM](https://discourse.julialang.org/t/building-julia-with-the-latest-llvm/109395)

<div class="topic-metadata">

**Author:** [@eymay](https://discourse.julialang.org/u/eymay)\
**Replies:** 3\
**Last updated:** [January 29, 2024, 2:00pm UTC](https://discourse.julialang.org/t/building-julia-with-the-latest-llvm/109395 "2024-01-29T14:00:44Z")

</div>

Hi, I would like to build Julia for ARM and run it on Raspberry Pi 4 in 32 bit mode. I am quite new to Julia and would like to ask if my current config direction is correct. Make.user DEPS\_GIT = llvm USE\_BINARYBUILDER…

---

## [\[FR\] provide a predicate to check whether a type intersection subtypes some type?](https://discourse.julialang.org/t/fr-provide-a-predicate-to-check-whether-a-type-intersection-subtypes-some-type/109303)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 10\
**Last updated:** [January 27, 2024, 2:46am UTC](https://discourse.julialang.org/t/fr-provide-a-predicate-to-check-whether-a-type-intersection-subtypes-some-type/109303 "2024-01-27T02:46:56Z")

</div>

Just found out that typeintersect isn’t commutative, i.e., typeintersect(A, B) == typeintersect(B, A) isn’t guaranteed for general A and B: suboptimal typeintersections for degenerate TypeVars · Issue #53069 · JuliaLang/…

---

## [Intransitivities in subtyping](https://discourse.julialang.org/t/intransitivities-in-subtyping/109266)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 8\
**Last updated:** [January 25, 2024, 5:00pm UTC](https://discourse.julialang.org/t/intransitivities-in-subtyping/109266 "2024-01-25T17:00:16Z")

</div>

I think the WAT on subtyping is julia\> Direct = Tuple{String,String} Tuple{String, String} julia\> SubStr = Tuple{T,T} where T\<:String Tuple{T, T} where T\<:String julia\> SupStr = Tuple{T,T} where T\>:String Tuple{T, T} …

---

## [How about direct sum ⊕ as vector attach operator?](https://discourse.julialang.org/t/how-about-direct-sum-as-vector-attach-operator/109182)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 6\
**Last updated:** [January 24, 2024, 2:27pm UTC](https://discourse.julialang.org/t/how-about-direct-sum-as-vector-attach-operator/109182 "2024-01-24T14:27:04Z")

</div>

Background I know that Julia’s design is very reasonable, especially from the viewpoint of mathematics; it’s my favorite feature of Julia. For example, Julia uses \* as a string join operator instead of +, unlike many pro…

---

## [Case Study: Method Invalidations caused by Pkg.jl with Julia 1.11](https://discourse.julialang.org/t/case-study-method-invalidations-caused-by-pkg-jl-with-julia-1-11/109038)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 13\
**Last updated:** [January 23, 2024, 7:26pm UTC](https://discourse.julialang.org/t/case-study-method-invalidations-caused-by-pkg-jl-with-julia-1-11/109038 "2024-01-23T19:26:07Z")

</div>

Introduction When using Julia nightly, to be Julia 1.11, I noticed that loading Pkg.jl causes method invalidations. As of Julia 1.11, Pkg.jl is no longer part of the system image and is thus a normal package. Thus, Pkg.j…

---

## [Specifying Function Contract](https://discourse.julialang.org/t/specifying-function-contract/108983)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 17\
**Last updated:** [January 23, 2024, 5:22pm UTC](https://discourse.julialang.org/t/specifying-function-contract/108983 "2024-01-23T17:22:10Z")

</div>

There is lots of good work around specifying the interface of types, their traits, etc. I was curious if I’m missing conversation around declaring the behavior of a function in terms of its arguments somewhat like the si…

---

## [Be less aware of when Julia avoids specializing?](https://discourse.julialang.org/t/be-less-aware-of-when-julia-avoids-specializing/109111)

<div class="topic-metadata">

**Author:** [@mikmoore](https://discourse.julialang.org/u/mikmoore)\
**Replies:** 6\
**Last updated:** [January 23, 2024, 4:44am UTC](https://discourse.julialang.org/t/be-less-aware-of-when-julia-avoids-specializing/109111 "2024-01-23T04:44:37Z")

</div>

I count roughly 11 Discourse threads in the past 6 months linking to the near-infamous performance tip regarding when Julia avoids specializing to resolve performance issues. The purpose of this thread is to re-visit thi…

---

## [Questions regarding bootstrapping the new Array constructors in boot.jl](https://discourse.julialang.org/t/questions-regarding-bootstrapping-the-new-array-constructors-in-boot-jl/109110)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [January 22, 2024, 5:16pm UTC](https://discourse.julialang.org/t/questions-regarding-bootstrapping-the-new-array-constructors-in-boot-jl/109110 "2024-01-22T17:16:47Z")

</div>

These are the core constructors for Array on master: The constructor methods that accept the dimensions as a series of Ints (as opposed to a tuple of Ints) come first, and they’re eval-ed into Core. Why the use of e…

---

## [Can Julia execute WASM IR](https://discourse.julialang.org/t/can-julia-execute-wasm-ir/108972)

<div class="topic-metadata">

**Author:** [@Glen1](https://discourse.julialang.org/u/Glen1)\
**Replies:** 2\
**Last updated:** [January 19, 2024, 2:11am UTC](https://discourse.julialang.org/t/can-julia-execute-wasm-ir/108972 "2024-01-19T02:11:38Z")

</div>

There are plenty of comments about converting the entire Julia process into a WASM process, but is there any way to load and execute WASM IR in a julia environment. I’m looking to develop a function in Rust, convert to …

---

## [Is FemtoLisp just for fun now?](https://discourse.julialang.org/t/is-femtolisp-just-for-fun-now/108838)

<div class="topic-metadata">

**Author:** [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Replies:** 16\
**Last updated:** [January 17, 2024, 4:36pm UTC](https://discourse.julialang.org/t/is-femtolisp-just-for-fun-now/108838 "2024-01-17T16:36:35Z")

</div>

Now in v1.10 the parser is written in Julia, but we can still enjoy the FemtoLisp REPL with the --lisp flag. Is FemtoLisp purely an Easter egg now? Or does it do anything?

---

## [Why are missing values not ignored by default?](https://discourse.julialang.org/t/why-are-missing-values-not-ignored-by-default/106756)

<div class="topic-metadata">

**Author:** [@alfaromartino](https://discourse.julialang.org/u/alfaromartino)\
**Replies:** 329\
**Last updated:** [January 17, 2024, 5:34am UTC](https://discourse.julialang.org/t/why-are-missing-values-not-ignored-by-default/106756 "2024-01-17T05:34:06Z")

</div>

I love Julia. The only feature that I don’t like is the treatment of missing values. It really hinders your work when working with data analysis. Comparison operators like \> and ==, and aggregate functions like sum and …

---

## [Proposed alias for union types](https://discourse.julialang.org/t/proposed-alias-for-union-types/108205)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 144\
**Last updated:** [January 18, 2024, 1:29am UTC](https://discourse.julialang.org/t/proposed-alias-for-union-types/108205 "2024-01-18T01:29:12Z")

</div>

The | character is used in a few different languages as a concise way to specify type unions, like in TypeScript, Scala, PHP 8+, Python 3.10+, and (sort of) Haskell. I was curious to hear what people’s initial thoughts w…

---

## [Can declaring a field as const in a mutable struct require less memory?](https://discourse.julialang.org/t/can-declaring-a-field-as-const-in-a-mutable-struct-require-less-memory/108914)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 4\
**Last updated:** [January 17, 2024, 7:09pm UTC](https://discourse.julialang.org/t/can-declaring-a-field-as-const-in-a-mutable-struct-require-less-memory/108914 "2024-01-17T19:09:52Z")

</div>

Currently declaring a field as const in a mutable struct doesn’t seem to do anything: julia\> mutable struct A x::Int end julia\> mutable struct B const x::Int end julia\> @allocated A…

---

## [Syntax: Escape hatch for unicode haters](https://discourse.julialang.org/t/syntax-escape-hatch-for-unicode-haters/108363)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 124\
**Last updated:** [January 16, 2024, 1:58pm UTC](https://discourse.julialang.org/t/syntax-escape-hatch-for-unicode-haters/108363 "2024-01-16T13:58:19Z")

</div>

Some people have a perennial problem with unicode in source files, and would prefer to simply never deal with that. We have two interesting precedents inside the julia language to deal with that: String literals permi…

---

## [Instruction sequence for function calls](https://discourse.julialang.org/t/instruction-sequence-for-function-calls/108789)

<div class="topic-metadata">

**Author:** [@Dichloromethane](https://discourse.julialang.org/u/Dichloromethane)\
**Replies:** 0\
**Last updated:** [January 14, 2024, 11:17am UTC](https://discourse.julialang.org/t/instruction-sequence-for-function-calls/108789 "2024-01-14T11:17:56Z")

</div>

I was looking at some of the code generated by the compiler recently, and saw that, for some reason, the instruction sequence generated for function calls always consists of movabs rax, offset j\_func\_n call rax instead…

---

## [Warning against Unicode confusables](https://discourse.julialang.org/t/warning-against-unicode-confusables/108734)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 50\
**Last updated:** [January 13, 2024, 2:27pm UTC](https://discourse.julialang.org/t/warning-against-unicode-confusables/108734 "2024-01-13T14:27:42Z")

</div>

Even in the internal code (the guts; which you might have to look at, coding is not just about APIs), it is possible to have fun with Unicodes: Happy hacking!

---

## [Tab completion of \\uXXXX in the REPL?](https://discourse.julialang.org/t/tab-completion-of-uxxxx-in-the-repl/108442)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 23\
**Last updated:** [January 12, 2024, 10:39am UTC](https://discourse.julialang.org/t/tab-completion-of-uxxxx-in-the-repl/108442 "2024-01-12T10:39:47Z")

</div>

I would like to see better explicit support for UTF-8 encodings in Julia. The incredible success of Unicode in extending character encodings to pretty much all human languages is amazing. The ability to encode glyphs…

---

## [A pass-through option for IOCapture](https://discourse.julialang.org/t/a-pass-through-option-for-iocapture/108642)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 8\
**Last updated:** [January 12, 2024, 2:49am UTC](https://discourse.julialang.org/t/a-pass-through-option-for-iocapture/108642 "2024-01-12T02:49:19Z")

</div>

I’ve been using the amazing IOCapture quite extensively, and I was considering abusing for a situation where I want to siphon off (tee, in unix jargon) the stdout data while also allowing it to be printed in the termina…

---

## [Race condition reading from Pipe](https://discourse.julialang.org/t/race-condition-reading-from-pipe/108707)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 1\
**Last updated:** [January 11, 2024, 11:10pm UTC](https://discourse.julialang.org/t/race-condition-reading-from-pipe/108707 "2024-01-11T23:10:24Z")

</div>

Splitting this off from A \`tee\` option for \`IOCapture\` Does the following minimal working example for asynchronously reading data from a Pipe involve a race condition? using Random function main() pipe = Pipe() …

---

## [Why is \`Base.return\_types(String, Tuple{AbstractVector{UInt8}})\` so pessimistic for this method?](https://discourse.julialang.org/t/why-is-base-return-types-string-tuple-abstractvector-uint8-so-pessimistic-for-this-method/108505)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 6\
**Last updated:** [January 8, 2024, 10:04pm UTC](https://discourse.julialang.org/t/why-is-base-return-types-string-tuple-abstractvector-uint8-so-pessimistic-for-this-method/108505 "2024-01-08T22:04:59Z")

</div>

julia\> Base.return\_types(String, Tuple{AbstractVector{UInt8}}) 3-element Vector{Any}: String String Any julia\> methods(String, Tuple{AbstractVector{UInt8}}) # 3 methods for type constructor: \[1\] String(v::Vector{UIn…

---

## [Sources for the Zappa Nardelli et al. subtyping implementation?](https://discourse.julialang.org/t/sources-for-the-zappa-nardelli-et-al-subtyping-implementation/108531)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [January 8, 2024, 7:14pm UTC](https://discourse.julialang.org/t/sources-for-the-zappa-nardelli-et-al-subtyping-implementation/108531 "2024-01-08T19:14:26Z")

</div>

Francesco Zappa Nardelli, Julia Belyakova, Artem Pelenitsyn, Benjamin Chung, Jeff Bezanson, et al… Julia Subtyping: A Rational Reconstruction. Proceedings of the ACM on Programming Languages, 2018, 27, ⟨10.1145/3276483⟩…

---

## [Signature for \`jl\_array\_data\` is different in stable and nightly](https://discourse.julialang.org/t/signature-for-jl-array-data-is-different-in-stable-and-nightly/108519)

<div class="topic-metadata">

**Author:** [@dmitry-kabanov](https://discourse.julialang.org/u/dmitry-kabanov)\
**Replies:** 3\
**Last updated:** [January 8, 2024, 6:41pm UTC](https://discourse.julialang.org/t/signature-for-jl-array-data-is-different-in-stable-and-nightly/108519 "2024-01-08T18:41:32Z")

</div>

Hi, I have some C code with Julia embedding. The code is tested with versions 1.8 and nightly. However, it fails on nightly, due to the changes in the signature of jl\_array\_data (macro that obtains a C pointer from a Jul…

---

## [Redefining print method changes variable scoping in loop](https://discourse.julialang.org/t/redefining-print-method-changes-variable-scoping-in-loop/108010)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 9\
**Last updated:** [January 5, 2024, 2:20pm UTC](https://discourse.julialang.org/t/redefining-print-method-changes-variable-scoping-in-loop/108010 "2024-01-05T14:20:18Z")

</div>

Why does the first loop work but the second does not? The MWE: Summaryusing Printf for n in 1:10 if n == 1 flag = true idx\_last = 1 else flag = false idx\_last = ifelse(flag, n, idx\_last) end # P…

---

## [Non-deterministic normalization of Tuples of Unions](https://discourse.julialang.org/t/non-deterministic-normalization-of-tuples-of-unions/108347)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 6\
**Last updated:** [January 4, 2024, 11:57pm UTC](https://discourse.julialang.org/t/non-deterministic-normalization-of-tuples-of-unions/108347 "2024-01-04T23:57:24Z")

</div>

One problem I wanted to point at is: julia\> sumN(n) = Union{\[ Tuple{\[ifelse(i & (1\<\<j) != 0, Int8, UInt8 ) for j=0:n-1\]...} for i = 0:(2^n-1)\]...} sumN (generic function with 1 method) julia\> prodN(n) = NTuple{n, Unio…

---

## [Syntax for documenting enum members](https://discourse.julialang.org/t/syntax-for-documenting-enum-members/108355)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [January 4, 2024, 8:35pm UTC](https://discourse.julialang.org/t/syntax-for-documenting-enum-members/108355 "2024-01-04T20:35:24Z")

</div>

It would be nice to have a syntax for documenting enum members. For instance: @enum Fruit begin "round" APPLE "long" BANANA end which is currently an error. Thoughts?

---

## [Should functions only have one docstring per arity?](https://discourse.julialang.org/t/should-functions-only-have-one-docstring-per-arity/108266)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 4\
**Last updated:** [January 2, 2024, 8:14pm UTC](https://discourse.julialang.org/t/should-functions-only-have-one-docstring-per-arity/108266 "2024-01-02T20:14:53Z")

</div>

This question is a bit philosophical, but it’s probably worth thinking about. Given that we strive for generic functions in Julia, it seems that functions should only have one docstring per arity, each of which describes…

---

## [Why \`front\` and \`tail\` are defined for only \`Tuple\`?](https://discourse.julialang.org/t/why-front-and-tail-are-defined-for-only-tuple/101961)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 11\
**Last updated:** [January 1, 2024, 2:15am UTC](https://discourse.julialang.org/t/why-front-and-tail-are-defined-for-only-tuple/101961 "2024-01-01T02:15:47Z")

</div>

https://docs.julialang.org/en/v1/base/collections/#Base.front I expect below, but MethodError raised: julia\> x = \[3, 5, 7, 4, 0, 9\]; julia\> Base.front(x) \[3,5,7,4,0\] Of course x\[Not(end)\] is also great choice if we ar…

---

## [Interrupting Task in 0.4 vs 0.5+](https://discourse.julialang.org/t/interrupting-task-in-0-4-vs-0-5/3529)

<div class="topic-metadata">

**Author:** [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Replies:** 0\
**Last updated:** [May 5, 2017, 8:54am UTC](https://discourse.julialang.org/t/interrupting-task-in-0-4-vs-0-5/3529 "2017-05-05T08:54:53Z")

</div>

Interrupting task in 0.4 used to fail gracefully, while in 0.5+ it freezes the REPL in some situations, e.g: 0.4.7 : julia\> t = @schedule begin try remotecall\_fetch(1,sleep,100) cat…

[Previous page](https://discourse.julialang.org/c/dev/5.md?page=10)

[Next page](https://discourse.julialang.org/c/dev/5.md?page=12)
