# Internals & Design

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

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

**Page:** 15

---

## [Requests for comments](https://discourse.julialang.org/t/requests-for-comments/103551)

<div class="topic-metadata">

**Author:** [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Replies:** 5\
**Last updated:** [September 6, 2023, 8:18pm UTC](https://discourse.julialang.org/t/requests-for-comments/103551 "2023-09-06T20:18:33Z")

</div>

So far as I can tell, has Julia no system to develop the language, akin to RFC’s in other languages. This has worked superb for Rust, F#, Kotlin, and Python. Is this intentional, and do you see sense in them, potential…

---

## [The expression solution](https://discourse.julialang.org/t/the-expression-solution/103435)

<div class="topic-metadata">

**Author:** [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Replies:** 31\
**Last updated:** [September 3, 2023, 11:25am UTC](https://discourse.julialang.org/t/the-expression-solution/103435 "2023-09-03T11:25:26Z")

</div>

Hi We all know, how good Julia solves the age-old ‘expression problem’ and I have a couple of questions to anybody, who uses both Julia, and some language like Haskell, F# or OCaml. As you know, as a user of these lang…

---

## [How is a non-standard literal different from calling its corresponding macro?](https://discourse.julialang.org/t/how-is-a-non-standard-literal-different-from-calling-its-corresponding-macro/103349)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 8\
**Last updated:** [August 31, 2023, 11:35pm UTC](https://discourse.julialang.org/t/how-is-a-non-standard-literal-different-from-calling-its-corresponding-macro/103349 "2023-08-31T23:35:30Z")

</div>

julia\> x = "whoops" "whoops" julia\> @raw\_str("$x") # huh... ERROR: UndefVarError: x not defined Stacktrace: \[1\] top-level scope @ REPL\[48\]:1 julia\> "$x", raw"$x" # expected ("whoops", "\\$x") julia\> @macroexpand @r…

---

## [Applicability of interface guarantees to overloads](https://discourse.julialang.org/t/applicability-of-interface-guarantees-to-overloads/103427)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 0\
**Last updated:** [August 31, 2023, 9:30pm UTC](https://discourse.julialang.org/t/applicability-of-interface-guarantees-to-overloads/103427 "2023-08-31T21:30:13Z")

</div>

If M.f(x::Any) defined in M documents a postcondition (e.g. that the return value is sorted), is there a norm that an overload M.f(x::M2.T) defined in module M2 should also ensure that postcondition holds?

---

## [Unpacking in arglist vs inside function](https://discourse.julialang.org/t/unpacking-in-arglist-vs-inside-function/103264)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 4\
**Last updated:** [August 30, 2023, 12:09pm UTC](https://discourse.julialang.org/t/unpacking-in-arglist-vs-inside-function/103264 "2023-08-30T12:09:22Z")

</div>

Unpacking inside the function assigns into the parent scope; unpacking in the arglist binds a new variable. Should I expect that from something in Scope of Variables · The Julia Language or is that arglist-unpacking a sp…

---

## [\`DateTime\` arithmetic on \`Microsecond\` (or smaller) scale](https://discourse.julialang.org/t/datetime-arithmetic-on-microsecond-or-smaller-scale/102949)

<div class="topic-metadata">

**Author:** [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Replies:** 99\
**Last updated:** [August 26, 2023, 6:15pm UTC](https://discourse.julialang.org/t/datetime-arithmetic-on-microsecond-or-smaller-scale/102949 "2023-08-26T18:15:46Z")

</div>

There is currently a PR on the repo with very lively discussion about what the following operation should do: using Dates a = now() b = a + Nanosecond(1) (the situation is analogous with Microsecond) Currently, the …

---

## [\[Breaking\] Should \`isequal(convert(T, x), x)\` always be true?](https://discourse.julialang.org/t/breaking-should-isequal-convert-t-x-x-always-be-true/103169)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 3\
**Last updated:** [August 24, 2023, 9:00pm UTC](https://discourse.julialang.org/t/breaking-should-isequal-convert-t-x-x-always-be-true/103169 "2023-08-24T21:00:47Z")

</div>

In Julia 1.x, it seems like isequal(convert(T, x), x) is usually true for Base and standard library types. However, there is one notable exception: Char to Int and Int to Char. It is a little odd that this works: julia\> …

---

## [Error when using @cfunction](https://discourse.julialang.org/t/error-when-using-cfunction/103067)

<div class="topic-metadata">

**Author:** [@sletz](https://discourse.julialang.org/u/sletz)\
**Replies:** 4\
**Last updated:** [August 22, 2023, 3:12pm UTC](https://discourse.julialang.org/t/error-when-using-cfunction/103067 "2023-08-22T15:12:57Z")

</div>

The following code addVerticalSlider = @cfunction( $\_addVerticalSlider, Cvoid, (Ptr{Cvoid}, Cstring, Ptr{T}, T, T, T, T)) gives ERROR: TypeError: in cfunction method definition, expected Type, got a value…

---

## [Towards implementing CSE in the Julia compiler](https://discourse.julialang.org/t/towards-implementing-cse-in-the-julia-compiler/102922)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 12\
**Last updated:** [August 21, 2023, 3:40am UTC](https://discourse.julialang.org/t/towards-implementing-cse-in-the-julia-compiler/102922 "2023-08-21T03:40:34Z")

</div>

Specifically implementing CSE on Julia IR could be a pretty good introduction to the compiler for someone. We already have all the analysis needed (it’s the same analysis for dead code elimination), so it’s mostly just a…

---

## [Why is accessing a typed global different from dereferencing a const Ref](https://discourse.julialang.org/t/why-is-accessing-a-typed-global-different-from-dereferencing-a-const-ref/102992)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 9\
**Last updated:** [August 20, 2023, 11:29pm UTC](https://discourse.julialang.org/t/why-is-accessing-a-typed-global-different-from-dereferencing-a-const-ref/102992 "2023-08-20T23:29:58Z")

</div>

I had expected these to be implemented the same way, just loading a value of the specified type from a memory address, but it appears that the typed global needs 2 different loads. Why is that? Doesn’t seem to be a perfo…

---

## [Define a more generic meaning for \`typemin\`/\`typemax\`](https://discourse.julialang.org/t/define-a-more-generic-meaning-for-typemin-typemax/102874)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 9\
**Last updated:** [August 16, 2023, 7:38pm UTC](https://discourse.julialang.org/t/define-a-more-generic-meaning-for-typemin-typemax/102874 "2023-08-16T19:38:32Z")

</div>

typemin(T) says The lowest value representable by the given (real) numeric DataType T. Suppose we want to be more generic than a “(real) numeric” datatype. What should it say then? How about The minimum value repr…

---

## [Julia CI, how to help](https://discourse.julialang.org/t/julia-ci-how-to-help/102865)

<div class="topic-metadata">

**Author:** [@frylock](https://discourse.julialang.org/u/frylock)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 5:30pm UTC](https://discourse.julialang.org/t/julia-ci-how-to-help/102865 "2023-08-16T17:30:02Z")

</div>

I broke this question out so as to not clutter this thread. In there, @Lilith mentions how new folk can help with Julia’s CI. I have no experience with CI, but would like to learn. The steps detailed, in my poor underst…

---

## [Conversion of nothing to void pointer](https://discourse.julialang.org/t/conversion-of-nothing-to-void-pointer/102766)

<div class="topic-metadata">

**Author:** [@projekter](https://discourse.julialang.org/u/projekter)\
**Replies:** 11\
**Last updated:** [August 14, 2023, 1:10pm UTC](https://discourse.julialang.org/t/conversion-of-nothing-to-void-pointer/102766 "2023-08-14T13:10:37Z")

</div>

It is quite common in C interfaces to have functions that accept pointers to something, but they can also be given NULL instead, which means that for example the part that is related with this parameter is not of interes…

---

## [\`tail\` for Vector](https://discourse.julialang.org/t/tail-for-vector/102758)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 2\
**Last updated:** [August 13, 2023, 2:27am UTC](https://discourse.julialang.org/t/tail-for-vector/102758 "2023-08-13T02:27:54Z")

</div>

tail is only implemented on Tuple. If it were also for Vector, should it be a copy or a view?

---

## [Printing of UnionAll types is misleading, as of Julia version 1.7](https://discourse.julialang.org/t/printing-of-unionall-types-is-misleading-as-of-julia-version-1-7/89418)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 15\
**Last updated:** [August 10, 2023, 8:31pm UTC](https://discourse.julialang.org/t/printing-of-unionall-types-is-misleading-as-of-julia-version-1-7/89418 "2023-08-10T20:31:34Z")

</div>

Printing of UnionAll types used to be honest: Julia 1.6 julia\> struct A{asdf, qwer} end julia\> A{Int} A{Int64, qwer} where qwer julia\> using StructArrays julia\> struct Foo x::Int end julia\> StructA…

---

## [Automation to ensure green CI on master](https://discourse.julialang.org/t/automation-to-ensure-green-ci-on-master/102616)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 23\
**Last updated:** [August 10, 2023, 6:05pm UTC](https://discourse.julialang.org/t/automation-to-ensure-green-ci-on-master/102616 "2023-08-10T18:05:31Z")

</div>

CI on master is sometimes failing, which makes it harder for new contributors to make PRs because they don’t have a good signal about success/failure. Some projects like Rust ensure that the master branch of rust-lang/ru…

---

## [Type parameter display in 1.10 for MethodError](https://discourse.julialang.org/t/type-parameter-display-in-1-10-for-methoderror/102516)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 2\
**Last updated:** [August 5, 2023, 10:51am UTC](https://discourse.julialang.org/t/type-parameter-display-in-1-10-for-methoderror/102516 "2023-08-05T10:51:53Z")

</div>

When Julia 1.10 throws an error, the type parameters in the stacktrace are abbreviated, and I absolutely love it. However, they are not abbreviated in the error message itself when it is a MethodError. Does anyone know t…

---

## [Can we allow the syntax \`v.\[i\]\` to be converted to \`getindex.(v, i)\`?](https://discourse.julialang.org/t/can-we-allow-the-syntax-v-i-to-be-converted-to-getindex-v-i/102414)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 10\
**Last updated:** [August 3, 2023, 11:03am UTC](https://discourse.julialang.org/t/can-we-allow-the-syntax-v-i-to-be-converted-to-getindex-v-i/102414 "2023-08-03T11:03:19Z")

</div>

Hi! I have one scenario that happens all the time. I get a vector of vectors and I need to obtain each component individually to perform some analyses and plot the data. Today, I do: getindex.(v, 1) getindex.(v, 2) get…

---

## [Why HTTP.jl is not in Julia Core?](https://discourse.julialang.org/t/why-http-jl-is-not-in-julia-core/102426)

<div class="topic-metadata">

**Author:** [@DeevsDeevs](https://discourse.julialang.org/u/DeevsDeevs)\
**Replies:** 5\
**Last updated:** [August 3, 2023, 9:01am UTC](https://discourse.julialang.org/t/why-http-jl-is-not-in-julia-core/102426 "2023-08-03T09:01:40Z")

</div>

Hello Julia community, I have been using Julia for some time now and have found it to be an excellent language for various applications. However, I have noticed that HTTP.jl is not integrated into the Julia core, unlike…

---

## [Could (non) @view be made faster? I.e. @view be implicit using read-only arrays?](https://discourse.julialang.org/t/could-non-view-be-made-faster-i-e-view-be-implicit-using-read-only-arrays/102323)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 10\
**Last updated:** [August 1, 2023, 6:58pm UTC](https://discourse.julialang.org/t/could-non-view-be-made-faster-i-e-view-be-implicit-using-read-only-arrays/102323 "2023-08-01T18:58:43Z")

</div>

I see the suggestion “use @view/@views” often, to fix a performance problem; possibly for people coming from Python (is it also the default in MATLAB?). I know the difference, and support having a (at least a conception…

---

## [Testing GC.@preserve when doing compiler passes](https://discourse.julialang.org/t/testing-gc-preserve-when-doing-compiler-passes/102241)

<div class="topic-metadata">

**Author:** [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 10:49am UTC](https://discourse.julialang.org/t/testing-gc-preserve-when-doing-compiler-passes/102241 "2023-07-31T10:49:25Z")

</div>

I’m looking to extend Umlaut.jl’s tracing to handle the :gc\_preserve\_begin and :gc\_preserve\_end statements that can be found in Julia’s IR. For example, you will find these if you use GC.@preserve: foo(x) = GC.@preserve…

---

## [Understanding Varargs partial specialization](https://discourse.julialang.org/t/understanding-varargs-partial-specialization/102141)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 1\
**Last updated:** [July 27, 2023, 5:41am UTC](https://discourse.julialang.org/t/understanding-varargs-partial-specialization/102141 "2023-07-27T05:41:34Z")

</div>

In the “Be aware of when Julia avoids specializing”, section, the following is stated: As a heuristic, Julia avoids automatically specializing on argument type parameters in three specific cases: Type , Function , and V…

---

## [\`make cleanall\` breaks \`make\`?](https://discourse.julialang.org/t/make-cleanall-breaks-make/102009)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 2\
**Last updated:** [July 24, 2023, 2:02pm UTC](https://discourse.julialang.org/t/make-cleanall-breaks-make/102009 "2023-07-24T14:02:37Z")

</div>

While hacking on Julia Base, I ran make, which resulted in an error during bootstrap, and suggested I run make clean and make cleanall. I did that, the problem now is that make doesn’t work any more after make cleanall, …

---

## [Multiple function definitions inside let block override previous definitions](https://discourse.julialang.org/t/multiple-function-definitions-inside-let-block-override-previous-definitions/101954)

<div class="topic-metadata">

**Author:** [@asjir](https://discourse.julialang.org/u/asjir)\
**Replies:** 1\
**Last updated:** [July 23, 2023, 10:56am UTC](https://discourse.julialang.org/t/multiple-function-definitions-inside-let-block-override-previous-definitions/101954 "2023-07-23T10:56:32Z")

</div>

I haven’t stumbled across anyone else reporting it, so here’s what I’ve encountered: let isintvec(v) = false, isintvec(v::Vector{U}) where {U\<:Integer} = true isintvec(3) end throws MethodError thank god I wri…

---

## [What are everyone's style for documenting types (used for containers or for dispatch-only/"traits")?](https://discourse.julialang.org/t/what-are-everyones-style-for-documenting-types-used-for-containers-or-for-dispatch-only-traits/101991)

<div class="topic-metadata">

**Author:** [@RoyW](https://discourse.julialang.org/u/RoyW)\
**Replies:** 0\
**Last updated:** [July 23, 2023, 10:57pm UTC](https://discourse.julialang.org/t/what-are-everyones-style-for-documenting-types-used-for-containers-or-for-dispatch-only-traits/101991 "2023-07-23T22:57:54Z")

</div>

I’m trying to document my Julia packages not necessarily to the style of Base, but so that it communicates the ideas fast to serious users who have a basic training with Julia but have prior programming or even software …

---

## [Why is objectid not foldable for type arguments?](https://discourse.julialang.org/t/why-is-objectid-not-foldable-for-type-arguments/101928)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 3\
**Last updated:** [July 22, 2023, 6:06pm UTC](https://discourse.julialang.org/t/why-is-objectid-not-foldable-for-type-arguments/101928 "2023-07-22T18:06:31Z")

</div>

For some types, objectid now folds in Julia 1.10-alpha1: julia\> f() = objectid(1); @code\_typed f() CodeInfo( 1 ─ return 0x5bca7c69b0d0ebca ) =\> UInt64 However, it doesn’t fold with a type as argument: julia\> f() =…

---

## [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…

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

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