# Internals & Design

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

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

**Page:** 8

---

## [FrankenTuple Fun](https://discourse.julialang.org/t/frankentuple-fun/91507)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 0\
**Last updated:** [December 10, 2022, 11:18am UTC](https://discourse.julialang.org/t/frankentuple-fun/91507 "2022-12-10T11:18:32Z")

</div>

Yes, but (a; b) is horrible. That should be syntax for FrankenTuples . and and Turns out that (a,; b) parses, and has for awhile (according to this time machine): An experiment with FrankenTuples: julia\> us…

---

## [Is \`.chunks\` of \`BitArray\` considered internal API?](https://discourse.julialang.org/t/is-chunks-of-bitarray-considered-internal-api/121416)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 6\
**Last updated:** [October 17, 2024, 7:54pm UTC](https://discourse.julialang.org/t/is-chunks-of-bitarray-considered-internal-api/121416 "2024-10-17T19:54:17Z")

</div>

Currently I have a use case where I essentially need to pack AbstractVector{Bool} into the .chunks representation (i.e. each bit represent a bool value and “pad” to the smallest # of bytes that can accommodate the bits). …

---

## [Capture error from include\_string](https://discourse.julialang.org/t/capture-error-from-include-string/121385)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [October 16, 2024, 2:37pm UTC](https://discourse.julialang.org/t/capture-error-from-include-string/121385 "2024-10-16T14:37:30Z")

</div>

Consider my\_e = try include\_string(Main, "throw(ArgumentError(\\"test\\"))") catch e e end The exercise is to extract the ArgumentError("test") from my\_e using public API. Is this possible? Currently it is wrapp…

---

## [Broadcasting \`$\` as a binary operator](https://discourse.julialang.org/t/broadcasting-as-a-binary-operator/121229)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 7\
**Last updated:** [October 13, 2024, 12:03am UTC](https://discourse.julialang.org/t/broadcasting-as-a-binary-operator/121229 "2024-10-13T00:03:44Z")

</div>

It’s possible to define $ as a binary operator, but it turns out you can’t use it with broadcasting: julia\> ($)(x, y) = x + y $ (generic function with 1 method) julia\> 1 $ 2 3 julia\> \[1, 2\] .$ \[3, 4\] ERROR: ParseError…

---

## [OOP-like dot notation in Julia](https://discourse.julialang.org/t/oop-like-dot-notation-in-julia/120971)

<div class="topic-metadata">

**Author:** [@Barget](https://discourse.julialang.org/u/Barget)\
**Replies:** 44\
**Last updated:** [October 12, 2024, 5:08am UTC](https://discourse.julialang.org/t/oop-like-dot-notation-in-julia/120971 "2024-10-12T05:08:53Z")

</div>

This is a naive question, but given the widespread use of the object.method notation in OOP languages, I struggle to find a sound reason as of why it can’t (or shouldn’t) be supported in Julia? I assumes this has somethi…

---

## [What lowers to hvcat(::Int, ...)?](https://discourse.julialang.org/t/what-lowers-to-hvcat-int/121107)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [October 9, 2024, 3:37pm UTC](https://discourse.julialang.org/t/what-lowers-to-hvcat-int/121107 "2024-10-09T15:37:25Z")

</div>

I am curious what syntax lowers to hvcat(::Int, ...). Everything I tried lowers into the hvcat(::Tuple{Vararg{Int}}, ...) form. An example would be useful.

---

## [Partially applied \`Iterators.filter\`](https://discourse.julialang.org/t/partially-applied-iterators-filter/121103)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 0\
**Last updated:** [October 9, 2024, 11:17am UTC](https://discourse.julialang.org/t/partially-applied-iterators-filter/121103 "2024-10-09T11:17:23Z")

</div>

Is there a reason that the partially applied Iterators.filter(f) does not exist while Base.filter(f) does exist? It seems that the implementation Iterators.filter(f::Function) = Base.Fix1(Iterators.filter, f) should b…

---

## [Is Julia 2.0 needed?](https://discourse.julialang.org/t/is-julia-2-0-needed/120842)

<div class="topic-metadata">

**Author:** [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Replies:** 57\
**Last updated:** [October 7, 2024, 11:17am UTC](https://discourse.julialang.org/t/is-julia-2-0-needed/120842 "2024-10-07T11:17:56Z")

</div>

Python made a big break by going from Python2 to Python3. I haven’t seen much talk about Julia 2.0; the last threads that kind of referenced were from already from 2018. If 2.0 ever comes, I would like Julia to have sev…

---

## [Yet another precompilation-on-HPC issue](https://discourse.julialang.org/t/yet-another-precompilation-on-hpc-issue/105731)

<div class="topic-metadata">

**Author:** [@Davide\_DelVento](https://discourse.julialang.org/u/Davide_DelVento)\
**Replies:** 5\
**Last updated:** [October 2, 2024, 2:09pm UTC](https://discourse.julialang.org/t/yet-another-precompilation-on-hpc-issue/105731 "2024-10-02T14:09:58Z")

</div>

I administer an HPC cluster and I’ve installed Julia (using spack as a package manager) globally. Spack compiled julia in /tmp/aaa/spack-stage/spack-stage-julia-1.9.2-yux5s54oyok6xiifl5xwqeqjljazifjg/spack-src/ and then …

---

## [Why are Julia strings immutable?](https://discourse.julialang.org/t/why-are-julia-strings-immutable/117320)

<div class="topic-metadata">

**Author:** [@jpnesseth](https://discourse.julialang.org/u/jpnesseth)\
**Replies:** 13\
**Last updated:** [September 28, 2024, 4:33pm UTC](https://discourse.julialang.org/t/why-are-julia-strings-immutable/117320 "2024-09-28T16:33:52Z")

</div>

The question I have (after coming here, apparently VERY late), is WHY are strings immutable? Meaning, I’m assuming this either means that Julia doesn’t implement strings as arrays of characters, or there is a reason oth…

---

## [A possible change for Julia 2.0: per-argument mutation ! marks?](https://discourse.julialang.org/t/a-possible-change-for-julia-2-0-per-argument-mutation-marks/119631)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 12\
**Last updated:** [September 25, 2024, 2:39pm UTC](https://discourse.julialang.org/t/a-possible-change-for-julia-2-0-per-argument-mutation-marks/119631 "2024-09-25T14:39:31Z")

</div>

This is just a brain-dump. I find the convention of putting a ! in a function name to indicate a parameter might get changed to be less than satisfactory. Because consider this change!(a, b). What if the function chang…

---

## [Why \`for/if\` syntax is not allowed in loops](https://discourse.julialang.org/t/why-for-if-syntax-is-not-allowed-in-loops/119393)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 6\
**Last updated:** [September 20, 2024, 3:53am UTC](https://discourse.julialang.org/t/why-for-if-syntax-is-not-allowed-in-loops/119393 "2024-09-20T03:53:53Z")

</div>

Hi, I wonder why the combination of for and if is allowed in comprehension like nbe = sum(count(iseven,rv) for rv ∈ rvv if isodd(length(rv));init=0) but has to be written in two separate control flows statement in lo…

---

## [Would it be possible to add temporary dependency graph?](https://discourse.julialang.org/t/would-it-be-possible-to-add-temporary-dependency-graph/119592)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [September 19, 2024, 11:54am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-add-temporary-dependency-graph/119592 "2024-09-19T11:54:16Z")

</div>

For Julia packages dependency graphs are saved in Project/Manifest files. Would it be possible to have a way to add to the dependency graph branches that are session-specific? My user case is a MainPackage that call fu…

---

## [\[FR\] allow "freezing" an abstract type, making future attempts of adding a subtype throw](https://discourse.julialang.org/t/fr-allow-freezing-an-abstract-type-making-future-attempts-of-adding-a-subtype-throw/119554)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [September 19, 2024, 10:50am UTC](https://discourse.julialang.org/t/fr-allow-freezing-an-abstract-type-making-future-attempts-of-adding-a-subtype-throw/119554 "2024-09-19T10:50:46Z")

</div>

How about allowing an abstract type to be frozen (or, perhaps, closed) at some point? After the abstract type is frozen, any attempt at adding a new subtype to it would throw. Example: abstract type A end struct S \<: A …

---

## [Shape and Material - Refined type inference](https://discourse.julialang.org/t/shape-and-material-refined-type-inference/119064)

<div class="topic-metadata">

**Author:** [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Replies:** 9\
**Last updated:** [September 17, 2024, 2:45pm UTC](https://discourse.julialang.org/t/shape-and-material-refined-type-inference/119064 "2024-09-17T14:45:09Z")

</div>

That seems a pretty logical way, to improve type inference, type stability and code clearity in the compiler. Ross Tate presents a new class of type algorithm, that seems to solve some of the issues that the Julia compi…

---

## [Julia 1.11 beta high latency](https://discourse.julialang.org/t/julia-1-11-beta-high-latency/112819)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 22\
**Last updated:** [April 12, 2024, 3:18pm UTC](https://discourse.julialang.org/t/julia-1-11-beta-high-latency/112819 "2024-04-12T15:18:29Z")

</div>

I had a quick test of the beta today, and found it to be 20% to 70% slower than Julia 1.10. Is this to be expected?

---

## [Bool behavior for 2+, i.e. illegal values](https://discourse.julialang.org/t/bool-behavior-for-2-i-e-illegal-values/119328)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 7\
**Last updated:** [September 12, 2024, 2:45pm UTC](https://discourse.julialang.org/t/bool-behavior-for-2-i-e-illegal-values/119328 "2024-09-12T14:45:37Z")

</div>

I noticed in Dlang, most recent version: Compiler changes bool values other than 0 or 1 are not @safe The spec has been updated so that only 0 and 1 are safe values for bool. This means that reading a bool value wh…

---

## [Lowered optimization and targetted; even applied from the caller site](https://discourse.julialang.org/t/lowered-optimization-and-targetted-even-applied-from-the-caller-site/119326)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [September 12, 2024, 1:40pm UTC](https://discourse.julialang.org/t/lowered-optimization-and-targetted-even-applied-from-the-caller-site/119326 "2024-09-12T13:40:04Z")

</div>

From Jeff’s juliac JuliaCon talk: Just the \_init\_methods in Base take up 600k! The first line of attack, is less code, tree-shaking, as explained there. But it doesn’t rule out my idea for remaining code: It got me …

---

## [Type domain (static) integers](https://discourse.julialang.org/t/type-domain-static-integers/118568)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 28\
**Last updated:** [September 2, 2024, 4:41am UTC](https://discourse.julialang.org/t/type-domain-static-integers/118568 "2024-09-02T04:41:37Z")

</div>

I’m trying to get type domain integers into Base: Type domain integers are not a new idea, there was previously an effort by @Zach\_Christensen to get a StaticInt type into Base, and two relevant packages exist, Static…

---

## [How did we get here? (Why is Julia such a messy language?)](https://discourse.julialang.org/t/how-did-we-get-here-why-is-julia-such-a-messy-language/118839)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 27\
**Last updated:** [September 1, 2024, 8:02am UTC](https://discourse.julialang.org/t/how-did-we-get-here-why-is-julia-such-a-messy-language/118839 "2024-09-01T08:02:19Z")

</div>

Julia is a great language, but to be honest, I can’t say it’s ideal either. I love the language, but to not be able to criticize it is not a healthy love. It’s like Julia has been optimizing for things people say they ca…

---

## [Opaque closure and code\_typed](https://discourse.julialang.org/t/opaque-closure-and-code-typed/102690)

<div class="topic-metadata">

**Author:** [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Replies:** 0\
**Last updated:** [August 10, 2023, 6:25pm UTC](https://discourse.julialang.org/t/opaque-closure-and-code-typed/102690 "2023-08-10T18:25:38Z")

</div>

I’m playing around with opaque closures. I’ve have managed to construct the following toy example: struct Foo x::Float64 end (x::Foo)(y) = cos(sin(getfield(x, 1) \* y)) @eval function make\_opaque\_closure(x) ret…

---

## [Any existing efforts on cross-compiling Julia programs across different platforms?](https://discourse.julialang.org/t/any-existing-efforts-on-cross-compiling-julia-programs-across-different-platforms/118253)

<div class="topic-metadata">

**Author:** [@Barzin](https://discourse.julialang.org/u/Barzin)\
**Replies:** 3\
**Last updated:** [August 17, 2024, 12:03pm UTC](https://discourse.julialang.org/t/any-existing-efforts-on-cross-compiling-julia-programs-across-different-platforms/118253 "2024-08-17T12:03:57Z")

</div>

Hi everyone, I’m looking at possibilities for cross-compiling Julia programs, which would enable compiling on one platform to run natively on another without setting up separate environments or relying on emulation. Thi…

---

## [The case for the Julia compiler models](https://discourse.julialang.org/t/the-case-for-the-julia-compiler-models/118304)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 0\
**Last updated:** [August 17, 2024, 11:33am UTC](https://discourse.julialang.org/t/the-case-for-the-julia-compiler-models/118304 "2024-08-17T11:33:40Z")

</div>

Motivation: Interpretation: The ML space is large enough for Julia to have its place. Combining an excellent-grade ML ecosystem with Julia’s niche several things can probably be made. But then, what’s the issue wit…

---

## [Named let or recursive let](https://discourse.julialang.org/t/named-let-or-recursive-let/118231)

<div class="topic-metadata">

**Author:** [@tobia](https://discourse.julialang.org/u/tobia)\
**Replies:** 7\
**Last updated:** [August 16, 2024, 7:33pm UTC](https://discourse.julialang.org/t/named-let-or-recursive-let/118231 "2024-08-16T19:33:31Z")

</div>

One of the features I miss from Scheme is the “named let.” It’s a let expression that allows its own body to invoke itself recursively, by giving it a name that can be used to run another instance of the body on the call…

---

## [\[FR\] a new variant on method static parameter matching for getting the upper bound](https://discourse.julialang.org/t/fr-a-new-variant-on-method-static-parameter-matching-for-getting-the-upper-bound/118261)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 0\
**Last updated:** [August 16, 2024, 9:16am UTC](https://discourse.julialang.org/t/fr-a-new-variant-on-method-static-parameter-matching-for-getting-the-upper-bound/118261 "2024-08-16T09:16:48Z")

</div>

The method static parameter matching we currently have works like so: unless the lower bound and the upper bound on the parameter are equal, the parameter is undefined. In practice, what we often actually want is just t…

---

## [Making \`setindex\` public, how to document it, rethinking the Collections docs](https://discourse.julialang.org/t/making-setindex-public-how-to-document-it-rethinking-the-collections-docs/117419)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 13\
**Last updated:** [August 15, 2024, 12:03am UTC](https://discourse.julialang.org/t/making-setindex-public-how-to-document-it-rethinking-the-collections-docs/117419 "2024-08-15T00:03:06Z")

</div>

@aplavin is trying to make Base.setindex a public API of Julia, which seems like a good idea, given that many packages use it already and it seems like an OK interface. The question is, how to document it. The function i…

---

## [Why does \`show\` for arrays and dictionaries ignore \`:compact\`?](https://discourse.julialang.org/t/why-does-show-for-arrays-and-dictionaries-ignore-compact/118159)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 6\
**Last updated:** [August 14, 2024, 5:43am UTC](https://discourse.julialang.org/t/why-does-show-for-arrays-and-dictionaries-ignore-compact/118159 "2024-08-14T05:43:30Z")

</div>

The documentation for IOContext says :compact output should not contain line breaks However, this is ignored by arrays and dictionaries: julia\> show(IOContext(stdout, :compact =\> true), MIME"text/plain"(), \[1, 2\]) 2…

---

## [Summary of piping/chaining proposal?](https://discourse.julialang.org/t/summary-of-piping-chaining-proposal/91442)

<div class="topic-metadata">

**Author:** [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Replies:** 23\
**Last updated:** [August 13, 2024, 10:04pm UTC](https://discourse.julialang.org/t/summary-of-piping-chaining-proposal/91442 "2024-08-13T22:04:26Z")

</div>

There’s been a lot of posts about piping/chaining syntax, including: Allowing the object.method(args...) syntax as an alias for method(object, args ...) Fixing the Piping/Chaining Issue Fixing the Piping/Chaining/Parti…

---

## [Is there a reason why typeintersect constrains the args using type assertions in the method body instead of using dispatch?](https://discourse.julialang.org/t/is-there-a-reason-why-typeintersect-constrains-the-args-using-type-assertions-in-the-method-body-instead-of-using-dispatch/118102)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 0\
**Last updated:** [August 12, 2024, 4:49pm UTC](https://discourse.julialang.org/t/is-there-a-reason-why-typeintersect-constrains-the-args-using-type-assertions-in-the-method-body-instead-of-using-dispatch/118102 "2024-08-12T16:49:58Z")

</div>

This is the definition of typeintersect: typeintersect(@nospecialize(a), @nospecialize(b)) = (@\_total\_meta; ccall(:jl\_type\_intersection, Any, (Any, Any), a::Type, b::Type)) It seems like the following would be an i…

---

## [Suggestion for enhanced \`sizehint!\`](https://discourse.julialang.org/t/suggestion-for-enhanced-sizehint/118051)

<div class="topic-metadata">

**Author:** [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Replies:** 5\
**Last updated:** [August 12, 2024, 9:09am UTC](https://discourse.julialang.org/t/suggestion-for-enhanced-sizehint/118051 "2024-08-12T09:09:12Z")

</div>

I have a couple of times had the following problem. An algorithm which uses a vector v and does some push! and some pushfirst!. I know in advance the maximum number of pushfirst!, and the maximum number of push! that mig…

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

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