# Internals & Design

**URL:** https://discourse.julialang.org/c/dev/5.md?no_subcategories=false&page=15

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

**Page:** 16

---

## [Better compile-time computation facility](https://discourse.julialang.org/t/better-compile-time-computation-facility/101913)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 3\
**Last updated:** [July 22, 2023, 12:56am UTC](https://discourse.julialang.org/t/better-compile-time-computation-facility/101913 "2023-07-22T00:56:17Z")

</div>

We need better things to ensure certain stuffs (like static array size or complicated types) gets computed at compile time. If only there were some function decorators or some “const-expression” which says “if the input …

---

## [Types in \`:foreigncall\` nodes](https://discourse.julialang.org/t/types-in-foreigncall-nodes/101830)

<div class="topic-metadata">

**Author:** [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Replies:** 2\
**Last updated:** [July 20, 2023, 6:45pm UTC](https://discourse.julialang.org/t/types-in-foreigncall-nodes/101830 "2023-07-20T18:45:35Z")

</div>

Consider: julia\> @code\_warntype Base.unsafe\_convert(Ptr{Float64}, randn(10)) MethodInstance for Base.unsafe\_convert(::Type{Ptr{Float64}}, ::Vector{Float64}) from unsafe\_convert(::Type{Ptr{T}}, a::Array{T}) where T @ B…

---

## [Should we disallow non-compliant \`AbstractUnitRange\`s where \`typeof(step)\` doesn't match the \`eltype\`?](https://discourse.julialang.org/t/should-we-disallow-non-compliant-abstractunitrange-s-where-typeof-step-doesnt-match-the-eltype/101695)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 7\
**Last updated:** [July 17, 2023, 8:13pm UTC](https://discourse.julialang.org/t/should-we-disallow-non-compliant-abstractunitrange-s-where-typeof-step-doesnt-match-the-eltype/101695 "2023-07-17T20:13:33Z")

</div>

Currently, the docstring for AbstractUnitRange states: AbstractUnitRange{T} \<: OrdinalRange{T, T} Supertype for ranges with a step size of \`oneunit(T)\` with elements of type \`T\`. This implies that the step must be…

---

## [How does a nested function display its local name only when assigned to a matching global name?](https://discourse.julialang.org/t/how-does-a-nested-function-display-its-local-name-only-when-assigned-to-a-matching-global-name/101685)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 1\
**Last updated:** [July 17, 2023, 7:59am UTC](https://discourse.julialang.org/t/how-does-a-nested-function-display-its-local-name-only-when-assigned-to-a-matching-global-name/101685 "2023-07-17T07:59:14Z")

</div>

v1.8.3 MWE: julia\> function gh(n) g() = n h = () -\> n g, h end gh (generic function with 1 method) julia\> g2, h2 = gh(1) (var"#g#2"{Int64}(1), var"#1#3"{Int64}(1)) julia\> g, h = g2, h…

---

## [Getting all method definitions for a \`Module\`](https://discourse.julialang.org/t/getting-all-method-definitions-for-a-module/101639)

<div class="topic-metadata">

**Author:** [@ulysses](https://discourse.julialang.org/u/ulysses)\
**Replies:** 19\
**Last updated:** [July 15, 2023, 2:56am UTC](https://discourse.julialang.org/t/getting-all-method-definitions-for-a-module/101639 "2023-07-15T02:56:15Z")

</div>

Is there a way to get all method definitions in a Module? I tried names(mod;all=true,imported=true) but going this way still doesn’t catch methods extending existing functions using this style: function Base.push!(c::MyC…

---

## [Precedence of \`=\` vs \`,\`](https://discourse.julialang.org/t/precedence-of-vs/101637)

<div class="topic-metadata">

**Author:** [@Neal\_Gafter](https://discourse.julialang.org/u/Neal_Gafter)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 11:09pm UTC](https://discourse.julialang.org/t/precedence-of-vs/101637 "2023-07-14T23:09:49Z")

</div>

The precedence below seems inconsistent. In particular, the last result is unexpected. Is the Julia precedence “whatever the parser does”, or is there some underlying design? julia\> quote a, b end quote …

---

## [Thoughts and tempering expectations on redefining structs](https://discourse.julialang.org/t/thoughts-and-tempering-expectations-on-redefining-structs/101190)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 58\
**Last updated:** [July 12, 2023, 11:11pm UTC](https://discourse.julialang.org/t/thoughts-and-tempering-expectations-on-redefining-structs/101190 "2023-07-12T23:11:56Z")

</div>

TLDR: musings on how redefining structs cannot be as convenient as we’d like, nothing really important so feel free to ignore this thread Overoptimistic expectations We enjoy the interactivity and incremental code modi…

---

## [Links to PRs in News.md not working?](https://discourse.julialang.org/t/links-to-prs-in-news-md-not-working/101302)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [July 11, 2023, 10:16am UTC](https://discourse.julialang.org/t/links-to-prs-in-news-md-not-working/101302 "2023-07-11T10:16:14Z")

</div>

When I load https://github.com/JuliaLang/julia/blob/release-1.10/NEWS.md, none of the PR numbers show up as links for me. I just see, e.g., (\[#46372\]). Is it just me, or do others see the same? It would have been nice to…

---

## [How are (mutually) recursive methods inferred correctly?](https://discourse.julialang.org/t/how-are-mutually-recursive-methods-inferred-correctly/101463)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 3\
**Last updated:** [July 11, 2023, 7:02am UTC](https://discourse.julialang.org/t/how-are-mutually-recursive-methods-inferred-correctly/101463 "2023-07-11T07:02:20Z")

</div>

This is something I took for granted and never really thought of. A C example I pulled from wikipedia will help me explain: # really inefficient check of evenness or oddness # "is n even" -\> "is n-1 odd" -\> "is n-2 even…

---

## [RFC: Non-standard string literals should be quotable](https://discourse.julialang.org/t/rfc-non-standard-string-literals-should-be-quotable/101460)

<div class="topic-metadata">

**Author:** [@savq](https://discourse.julialang.org/u/savq)\
**Replies:** 0\
**Last updated:** [July 10, 2023, 11:06pm UTC](https://discourse.julialang.org/t/rfc-non-standard-string-literals-should-be-quotable/101460 "2023-07-10T23:06:19Z")

</div>

While working on tree-sitter-julia, I’ve found some inconsistencies in the way Julia treats non-standard string literals versus similar syntactic forms of the language. In Julia, you can quote identifiers, literals and …

---

## [Base.Iterators.partition for Dict and Set](https://discourse.julialang.org/t/base-iterators-partition-for-dict-and-set/101414)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 0\
**Last updated:** [July 9, 2023, 11:53pm UTC](https://discourse.julialang.org/t/base-iterators-partition-for-dict-and-set/101414 "2023-07-09T23:53:07Z")

</div>

A recent blog post highlighted the usage of Base.Iterators.partition for correctly managing state in a multithreaded code. I checked how this function behaves on Dict and Set and found that it copies the data (see trace…

---

## [Re the blog post: PSA: Thread-local state is no longer recommended](https://discourse.julialang.org/t/re-the-blog-post-psa-thread-local-state-is-no-longer-recommended/101303)

<div class="topic-metadata">

**Author:** [@wherrera](https://discourse.julialang.org/u/wherrera)\
**Replies:** 7\
**Last updated:** [July 8, 2023, 8:55am UTC](https://discourse.julialang.org/t/re-the-blog-post-psa-thread-local-state-is-no-longer-recommended/101303 "2023-07-08T08:55:27Z")

</div>

Disfavored in the blog post, due to issues with threadid, was: using Base.Threads: nthreads, @threads, threadid states = \[some\_initial\_value for \_ in 1:nthreads()\] @threads for x in some\_data tid = threadid() o…

---

## [Julia 1.10 feature freeze: Tuesday, June 27, 2023](https://discourse.julialang.org/t/julia-1-10-feature-freeze-tuesday-june-27-2023/100198)

<div class="topic-metadata">

**Author:** [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Replies:** 2\
**Last updated:** [July 3, 2023, 6:07pm UTC](https://discourse.julialang.org/t/julia-1-10-feature-freeze-tuesday-june-27-2023/100198 "2023-07-03T18:07:48Z")

</div>

We’ve set the feature freeze for Julia 1.10 to Tuesday, June 27, 2023. If there are any feature PRs that you’d like to get into Julia 1.10, they’ll need to be merged prior to that date. For context, the Julia 1.9 featu…

---

## [Allocations for type assertions](https://discourse.julialang.org/t/allocations-for-type-assertions/101104)

<div class="topic-metadata">

**Author:** [@motabbara](https://discourse.julialang.org/u/motabbara)\
**Replies:** 4\
**Last updated:** [July 3, 2023, 7:14am UTC](https://discourse.julialang.org/t/allocations-for-type-assertions/101104 "2023-07-03T07:14:50Z")

</div>

In the below code snippet something::ConcreteType = mydict\[key\] ###mydict = Dict{String,AbstractType}() the LLVM IR shows a call to ijl\_gc\_pool\_alloc and from the labelling, it looks like that’s part of the type assert…

---

## [List all live(non gc'ed) tasks?](https://discourse.julialang.org/t/list-all-live-non-gced-tasks/9217)

<div class="topic-metadata">

**Author:** [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Replies:** 5\
**Last updated:** [July 1, 2023, 6:53am UTC](https://discourse.julialang.org/t/list-all-live-non-gced-tasks/9217 "2023-07-01T06:53:12Z")

</div>

Is there a way to get a list of all “live” tasks in the current session?

---

## [Eager finalization and smart pointers](https://discourse.julialang.org/t/eager-finalization-and-smart-pointers/92462)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 11\
**Last updated:** [June 23, 2023, 7:02pm UTC](https://discourse.julialang.org/t/eager-finalization-and-smart-pointers/92462 "2023-06-23T19:02:52Z")

</div>

Smart pointers are pointers that free themselves when they are no longer needed. In Julia, we usually use the garbage collector for this purpose. However, we sometimes work with memory that is not managed by the garbage …

---

## [Branch on whether a value is known to the compiler](https://discourse.julialang.org/t/branch-on-whether-a-value-is-known-to-the-compiler/34850)

<div class="topic-metadata">

**Author:** [@Per](https://discourse.julialang.org/u/Per)\
**Replies:** 6\
**Last updated:** [June 15, 2023, 11:00am UTC](https://discourse.julialang.org/t/branch-on-whether-a-value-is-known-to-the-compiler/34850 "2023-06-15T11:00:13Z")

</div>

Here’s something that I’ve been thinking about: What if there was a way to write code that works differently depending on whether some value is known to the compiler? As an example, let’s say I could write: @inline fun…

---

## [Should a reassigning begin block execute before a variable's value is set?](https://discourse.julialang.org/t/should-a-reassigning-begin-block-execute-before-a-variables-value-is-set/100038)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 26\
**Last updated:** [June 9, 2023, 9:47pm UTC](https://discourse.julialang.org/t/should-a-reassigning-begin-block-execute-before-a-variables-value-is-set/100038 "2023-06-09T21:47:20Z")

</div>

A youtuber leddoo posed an interesting “bug” (in some other language). It’s hard to explain in words but it has to do with whether a value is set before or after a subsequent block executes. Commenters actually were not …

---

## [Function call dependency tracking in Python / how to do it in Julia](https://discourse.julialang.org/t/function-call-dependency-tracking-in-python-how-to-do-it-in-julia/100064)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 2\
**Last updated:** [June 8, 2023, 8:45pm UTC](https://discourse.julialang.org/t/function-call-dependency-tracking-in-python-how-to-do-it-in-julia/100064 "2023-06-08T20:45:34Z")

</div>

I found this post from a Python friend of mine very interesting, especially in the context of comparing Python and Julia introspection and metaprogramming tools. He works through what is necessary for function-level depe…

---

## [Toward a real and final solution to Julia’s variable scope issue](https://discourse.julialang.org/t/toward-a-real-and-final-solution-to-julia-s-variable-scope-issue/99908)

<div class="topic-metadata">

**Author:** [@anon98050359](https://discourse.julialang.org/u/anon98050359)\
**Replies:** 35\
**Last updated:** [June 6, 2023, 9:50pm UTC](https://discourse.julialang.org/t/toward-a-real-and-final-solution-to-julia-s-variable-scope-issue/99908 "2023-06-06T21:50:27Z")

</div>

I have been learning Julia lately and found it amazing. I was planning to make it one of my main tools, along Haskell and Rust. But the scope issues killed my enthusiasm. I read the documentation about it, but I am stil…

---

## [Stop of a range with length 0](https://discourse.julialang.org/t/stop-of-a-range-with-length-0/99865)

<div class="topic-metadata">

**Author:** [@abs](https://discourse.julialang.org/u/abs)\
**Replies:** 3\
**Last updated:** [June 5, 2023, 6:49am UTC](https://discourse.julialang.org/t/stop-of-a-range-with-length-0/99865 "2023-06-05T06:49:29Z")

</div>

Just curious: For the following kind of ranges of length 0, please note the submitted stop and returned julia\> 12:1:\*\*3\*\* 12:1:\*\*11\*\* julia\> range(12,\*\*stop=3\*\*;step = 1) 12:1:\*\*11\*\* Is this by design? \_range(start:…

---

## [Optional parameters with default types in parametric structure constructors](https://discourse.julialang.org/t/optional-parameters-with-default-types-in-parametric-structure-constructors/99812)

<div class="topic-metadata">

**Author:** [@zp3](https://discourse.julialang.org/u/zp3)\
**Replies:** 12\
**Last updated:** [June 4, 2023, 6:19pm UTC](https://discourse.julialang.org/t/optional-parameters-with-default-types-in-parametric-structure-constructors/99812 "2023-06-04T18:19:35Z")

</div>

Hi folks, I’m quite new to Julia (1.9) so please forgive me if this is a silly request or if I have overseen something. However, I’m currently facing serious troubles/incoveniences while implementing some parametric str…

---

## [Weird behavior for types within type definitions](https://discourse.julialang.org/t/weird-behavior-for-types-within-type-definitions/99581)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [June 3, 2023, 12:26am UTC](https://discourse.julialang.org/t/weird-behavior-for-types-within-type-definitions/99581 "2023-06-03T00:26:03Z")

</div>

Minimal example: struct A struct B end end. This puts both A and B into the global scope, A without constructors and B with a constructor. Why would B be put into global scope even though no global keyword was used? Mor…

---

## [Interface guarantees](https://discourse.julialang.org/t/interface-guarantees/99244)

<div class="topic-metadata">

**Author:** [@FelixBenning](https://discourse.julialang.org/u/FelixBenning)\
**Replies:** 22\
**Last updated:** [May 31, 2023, 6:43pm UTC](https://discourse.julialang.org/t/interface-guarantees/99244 "2023-05-31T18:43:57Z")

</div>

So in this entire thread in particular this post there is the notion that tests could replace formal interfaces. At the moment intefaces are only defined in documentation and that leads to a lot of stability issues it s…

---

## [Discussion on the future for performant programming in Julia](https://discourse.julialang.org/t/discussion-on-the-future-for-performant-programming-in-julia/99509)

<div class="topic-metadata">

**Author:** [@jt1](https://discourse.julialang.org/u/jt1)\
**Replies:** 5\
**Last updated:** [May 30, 2023, 6:02am UTC](https://discourse.julialang.org/t/discussion-on-the-future-for-performant-programming-in-julia/99509 "2023-05-30T06:02:02Z")

</div>

Edit for future readers, the respones of @ChrisRackauckas in this thread, together with the response of @tim.holy here (which I missed) gives a clear enough plan. The following gives an explanation as to why roadmaps a…

---

## [GC improvements ideas/progress](https://discourse.julialang.org/t/gc-improvements-ideas-progress/99537)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 5\
**Last updated:** [May 29, 2023, 3:44pm UTC](https://discourse.julialang.org/t/gc-improvements-ideas-progress/99537 "2023-05-29T15:44:40Z")

</div>

Julia’s GC still has a long way to go. ideas/information on the state of Julia’s GC appreciated. I know some of these ideas will add LOTS of works. This is not supposed to be a list of things that MUST be done, but thin…

---

## [1.10 release planning](https://discourse.julialang.org/t/1-10-release-planning/99473)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [May 27, 2023, 9:45am UTC](https://discourse.julialang.org/t/1-10-release-planning/99473 "2023-05-27T09:45:10Z")

</div>

I see that there are only 12 open tickets for 1.10, and they mostly look like smaller issues. Are there any other, larger goals for this release that are not yet implemented and not in the list of tickets?

---

## [Copy button in documentation copies prompt and result along with code](https://discourse.julialang.org/t/copy-button-in-documentation-copies-prompt-and-result-along-with-code/98963)

<div class="topic-metadata">

**Author:** [@chunjiw](https://discourse.julialang.org/u/chunjiw)\
**Replies:** 5\
**Last updated:** [May 21, 2023, 9:34am UTC](https://discourse.julialang.org/t/copy-button-in-documentation-copies-prompt-and-result-along-with-code/98963 "2023-05-21T09:34:33Z")

</div>

Proud Julia user here, but I am quite surprised that copy buttons in, for example, docs for joinpath gives such result, e.g. julia\> joinpath(\["/home/myuser", "example.jl"\]) "/home/myuser/example.jl" To me it makes much…

---

## [Why is \`1/5\` not equal to \`1//5\`?](https://discourse.julialang.org/t/why-is-1-5-not-equal-to-1-5/98881)

<div class="topic-metadata">

**Author:** [@scheinerman](https://discourse.julialang.org/u/scheinerman)\
**Replies:** 15\
**Last updated:** [May 18, 2023, 2:49am UTC](https://discourse.julialang.org/t/why-is-1-5-not-equal-to-1-5/98881 "2023-05-18T02:49:30Z")

</div>

I am curious about the decision to have 1/5 == 1//5 return false. I’m assuming there is a rationale (pun intended) and would like to understand why. Note that 1/2 == 1//2 returns true. This make sense in so far as some …

---

## [Why \`any!\`?](https://discourse.julialang.org/t/why-any/98976)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [May 17, 2023, 3:31am UTC](https://discourse.julialang.org/t/why-any/98976 "2023-05-17T03:31:29Z")

</div>

Why does any! exist? Why not just broadcast or map any?

[Previous page](https://discourse.julialang.org/c/dev/5.md?no_subcategories=false&page=14)

[Next page](https://discourse.julialang.org/c/dev/5.md?no_subcategories=false&page=16)
