# Internals & Design

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

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

**Page:** 36

---

## [Features most wanted in Julia](https://discourse.julialang.org/t/features-most-wanted-in-julia/50821)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 10\
**Last updated:** [December 1, 2020, 10:32pm UTC](https://discourse.julialang.org/t/features-most-wanted-in-julia/50821 "2020-12-01T22:32:45Z")

</div>

We had an excellent discussion on Slack the other day where many people gave input to what they considered the “biggest things missing in Julia”. I thought it would be a shame if all the feedback just disappeared into th…

---

## [REPL Environment](https://discourse.julialang.org/t/repl-environment/50977)

<div class="topic-metadata">

**Author:** [@vaeli](https://discourse.julialang.org/u/vaeli)\
**Replies:** 2\
**Last updated:** [November 30, 2020, 8:51pm UTC](https://discourse.julialang.org/t/repl-environment/50977 "2020-11-30T20:51:19Z")

</div>

Hello! There is only a command for total refresh, or restart, to make it possible to create a class with different variables in Julia. Mathematically, it would help to have such command: "Store “Package1"” To have Ju…

---

## [How is Julia written in Julia?](https://discourse.julialang.org/t/how-is-julia-written-in-julia/50918)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 9\
**Last updated:** [November 30, 2020, 1:18am UTC](https://discourse.julialang.org/t/how-is-julia-written-in-julia/50918 "2020-11-30T01:18:37Z")

</div>

Hey all, I am broadly trying to understand how Julia as a language is written in Julia itself. Is the compiler what is enabling this or is there a different reason?

---

## [Why not an even-harder scope?](https://discourse.julialang.org/t/why-not-an-even-harder-scope/50087)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 29\
**Last updated:** [November 27, 2020, 11:59pm UTC](https://discourse.julialang.org/t/why-not-an-even-harder-scope/50087 "2020-11-27T23:59:40Z")

</div>

I know this is hardly the first post about scoping being “different” in different places (documented here), but I had a thought and couldn’t really find any post that addressed it. I’ll try to give a short recap: versio…

---

## [Redefining structs without restart?](https://discourse.julialang.org/t/redefining-structs-without-restart/50826)

<div class="topic-metadata">

**Author:** [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Replies:** 53\
**Last updated:** [November 26, 2020, 9:14pm UTC](https://discourse.julialang.org/t/redefining-structs-without-restart/50826 "2020-11-26T21:14:11Z")

</div>

One reason is that we don’t keep backedges to type constructors, and consequently Julia doesn’t know what code it needs to invalidate if you change a type definition. There’s good reason to avoid backedges for type cons…

---

## [Func compose(∘) is slow](https://discourse.julialang.org/t/func-compose-is-slow/50776)

<div class="topic-metadata">

**Author:** [@novitk](https://discourse.julialang.org/u/novitk)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 10:40pm UTC](https://discourse.julialang.org/t/func-compose-is-slow/50776 "2020-11-25T22:40:31Z")

</div>

newbie here, so code\_lowered and code\_llvm is magic for me atm, but can somebody explain this pls(1.5.1)? julia\> using Dates julia\> n = 1\_000\_000 julia\> @time map(x-\>Time(Nanosecond(x)), rand(Int64, n)); 0.069440 sec…

---

## [Why cglobal() in BigInt finalizer?](https://discourse.julialang.org/t/why-cglobal-in-bigint-finalizer/50740)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 3\
**Last updated:** [November 25, 2020, 12:50pm UTC](https://discourse.julialang.org/t/why-cglobal-in-bigint-finalizer/50740 "2020-11-25T12:50:59Z")

</div>

Looking at gmp.jl source, I noticed that the finalizer in BigInt definition uses cglobal to get the (I assume) function pointer: function BigInt(; nbits::Integer=0) b = MPZ.init2!(new(), nbits) finalizer…

---

## [Why is bang(!) indicating argument mutation a convention, but not enforced?](https://discourse.julialang.org/t/why-is-bang-indicating-argument-mutation-a-convention-but-not-enforced/49783)

<div class="topic-metadata">

**Author:** [@bilderbuchi](https://discourse.julialang.org/u/bilderbuchi)\
**Replies:** 15\
**Last updated:** [November 18, 2020, 7:48pm UTC](https://discourse.julialang.org/t/why-is-bang-indicating-argument-mutation-a-convention-but-not-enforced/49783 "2020-11-18T19:48:48Z")

</div>

As a Julia beginner/neophyte, I am wondering why using a ! name suffix for functions that may mutate their arguments is merely a convention, but is not enforced by the compiler? It is nice to have this indication availa…

---

## [About Julia's stack (its range, growing direction, etc)](https://discourse.julialang.org/t/about-julias-stack-its-range-growing-direction-etc/50351)

<div class="topic-metadata">

**Author:** [@KDr2](https://discourse.julialang.org/u/KDr2)\
**Replies:** 4\
**Last updated:** [November 18, 2020, 1:45pm UTC](https://discourse.julialang.org/t/about-julias-stack-its-range-growing-direction-etc/50351 "2020-11-18T13:45:26Z")

</div>

I want to know if a certain object is allocated on stack or heap, here’s my thought: find the range of the stack find the location where the object data is placed check if the data location is in the stack range And h…

---

## [How to add a Feature in Julia Lang](https://discourse.julialang.org/t/how-to-add-a-feature-in-julia-lang/50325)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 7\
**Last updated:** [November 17, 2020, 8:33pm UTC](https://discourse.julialang.org/t/how-to-add-a-feature-in-julia-lang/50325 "2020-11-17T20:33:04Z")

</div>

I would like to use Sets like this: julia\> Set(1,2,3) Set{Int64} with 3 elements: 2 3 1 I want to add one overload. julia\> Set(args::T...) where T = Set(args) Set julia\> Set(args::Any...) = Set(args) Set How w…

---

## [Add @scalar macro to Base?](https://discourse.julialang.org/t/add-scalar-macro-to-base/50255)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 8\
**Last updated:** [November 17, 2020, 5:54pm UTC](https://discourse.julialang.org/t/add-scalar-macro-to-base/50255 "2020-11-17T17:54:00Z")

</div>

Would it be useful if Base exported an @scalar macro? The usage of @scalar would be to declare that a struct behaves as a scalar for broadcasting. So this @scalar struct A end would be re-written to this: struct A end…

---

## [Do we have something like this 🤔](https://discourse.julialang.org/t/do-we-have-something-like-this/50161)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 2\
**Last updated:** [November 16, 2020, 7:17pm UTC](https://discourse.julialang.org/t/do-we-have-something-like-this/50161 "2020-11-16T19:17:20Z")

</div>

---

## [Verify that function has been compiled?](https://discourse.julialang.org/t/verify-that-function-has-been-compiled/49885)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 12:30pm UTC](https://discourse.julialang.org/t/verify-that-function-has-been-compiled/49885 "2020-11-11T12:30:58Z")

</div>

Hi all, In order to decrease a GC pressure during training of machine learning models, we override the default julia allocator for arrays, such that these arrays are created inside the pre- allocated buffer, which is sc…

---

## [Julia Development cycle and release cycle](https://discourse.julialang.org/t/julia-development-cycle-and-release-cycle/49894)

<div class="topic-metadata">

**Author:** [@khloelxh](https://discourse.julialang.org/u/khloelxh)\
**Replies:** 4\
**Last updated:** [November 11, 2020, 11:26am UTC](https://discourse.julialang.org/t/julia-development-cycle-and-release-cycle/49894 "2020-11-11T11:26:54Z")

</div>

Hi there everyone, I’m relatively new to Julia programming language, and would just like to know how more on the the development cycle, and how the release cycle pool requests works? How do the admins prioritize the tas…

---

## [RFC: Source-relative paths & expression-level "comments"](https://discourse.julialang.org/t/rfc-source-relative-paths-expression-level-comments/49799)

<div class="topic-metadata">

**Author:** [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Replies:** 7\
**Last updated:** [November 10, 2020, 8:56pm UTC](https://discourse.julialang.org/t/rfc-source-relative-paths-expression-level-comments/49799 "2020-11-10T20:56:28Z")

</div>

Hi, I am not certain this is the appropriate forum for this - or if I should just be making a PR. I’m not part of the Julia dev team (don’t know the procedure). I realized it might be nice to have two small macros adde…

---

## [What depends on AbstractArray Iteration Order?](https://discourse.julialang.org/t/what-depends-on-abstractarray-iteration-order/49704)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 16\
**Last updated:** [November 8, 2020, 9:55pm UTC](https://discourse.julialang.org/t/what-depends-on-abstractarray-iteration-order/49704 "2020-11-08T21:55:37Z")

</div>

Should every AbstractArray be iterated over in cloumn-major order only? In other words, what relies on iterate preceding in a set order for AbstractArrays? To clarify, I mean iteration order in a very general sense. Cou…

---

## [Sigterm(15)](https://discourse.julialang.org/t/sigterm-15/49683)

<div class="topic-metadata">

**Author:** [@sz1992](https://discourse.julialang.org/u/sz1992)\
**Replies:** 0\
**Last updated:** [November 6, 2020, 2:40pm UTC](https://discourse.julialang.org/t/sigterm-15/49683 "2020-11-06T14:40:36Z")

</div>

Hi, killing julia (ubuntu linux) returns errors. This signal also could not be cought by atexit(). Is there an option to gracefully exit julia after SIGTERM is recived? Or at least to exit without errors? Note that af…

---

## [How is equality of anonymous function closures checked?](https://discourse.julialang.org/t/how-is-equality-of-anonymous-function-closures-checked/49397)

<div class="topic-metadata">

**Author:** [@mahrud](https://discourse.julialang.org/u/mahrud)\
**Replies:** 14\
**Last updated:** [November 5, 2020, 2:13pm UTC](https://discourse.julialang.org/t/how-is-equality-of-anonymous-function-closures-checked/49397 "2020-11-05T14:13:08Z")

</div>

I was wondering how equality of functions works in Julia, and eventually stumbled on this example, which I can’t quite explain: julia\> f = x -\> y -\> x + y #1 (generic function with 1 method) julia\> g = f(1); h = f(1); …

---

## [Pull request for printing Array{\<:Real,1}](https://discourse.julialang.org/t/pull-request-for-printing-array-real-1/49013)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 2\
**Last updated:** [November 3, 2020, 9:25pm UTC](https://discourse.julialang.org/t/pull-request-for-printing-array-real-1/49013 "2020-11-03T21:25:01Z")

</div>

A while ago I saw a pull request that changed printing so that Array{\<:Real,1} would print as Array{\<:Real,1}, instead of like this: julia\> Array{\<:Real,1} Array{var"#s17",1} where var"#s17"\<:Real But I can’t find that…

---

## [What is being cached in the stale compilation cache?](https://discourse.julialang.org/t/what-is-being-cached-in-the-stale-compilation-cache/49421)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 1\
**Last updated:** [November 1, 2020, 6:43pm UTC](https://discourse.julialang.org/t/what-is-being-cached-in-the-stale-compilation-cache/49421 "2020-11-01T18:43:41Z")

</div>

Julia used to do this a lot in 1.0, its mostly solved since 1.3 IIRC, because we have multiple caches. \[ Info: Recompiling stale cache file /Users/oxinabox/.julia/compiled/v1.0/Revise/M1Qoh.ji for Revise \[295af30f-e4ad-…

---

## [How does Char get stored?](https://discourse.julialang.org/t/how-does-char-get-stored/49366)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 7\
**Last updated:** [October 31, 2020, 7:47pm UTC](https://discourse.julialang.org/t/how-does-char-get-stored/49366 "2020-10-31T19:47:55Z")

</div>

I was basically under the impression that for 4 byte UTF-8 characters Char stored a UInt32 that was the codepoint containing all 4 codeunits. This is clearly not the case, as reinterpret disagrees with the codepoint j…

---

## [No documentation for the state of patches for dependencies of Julia](https://discourse.julialang.org/t/no-documentation-for-the-state-of-patches-for-dependencies-of-julia/44735)

<div class="topic-metadata">

**Author:** [@doronbehar](https://discourse.julialang.org/u/doronbehar)\
**Replies:** 12\
**Last updated:** [November 1, 2020, 10:00am UTC](https://discourse.julialang.org/t/no-documentation-for-the-state-of-patches-for-dependencies-of-julia/44735 "2020-11-01T10:00:37Z")

</div>

I’m trying to package Julia for my distro (NixOS) in the best possible manner. We’d like to use our own dependencies as much as possible, but I’m having trouble figuring out your policy and your status regarding this. He…

---

## [\`undef\` for \`isbits\` types with custom constructors](https://discourse.julialang.org/t/undef-for-isbits-types-with-custom-constructors/49203)

<div class="topic-metadata">

**Author:** [@Vasily\_Pisarev](https://discourse.julialang.org/u/Vasily_Pisarev)\
**Replies:** 17\
**Last updated:** [October 31, 2020, 8:46am UTC](https://discourse.julialang.org/t/undef-for-isbits-types-with-custom-constructors/49203 "2020-10-31T08:46:26Z")

</div>

Let’s say one defines a type with an inner constructor which keeps some invariant: struct OrdPair{T} lesser::T greater::T OrdPair(x::T, y::T) where T = new{T}(minmax(x, y)...) end Now, if one creates an uni…

---

## [Retrieve kwarg declaration type](https://discourse.julialang.org/t/retrieve-kwarg-declaration-type/49324)

<div class="topic-metadata">

**Author:** [@Benjia](https://discourse.julialang.org/u/Benjia)\
**Replies:** 5\
**Last updated:** [October 30, 2020, 8:19pm UTC](https://discourse.julialang.org/t/retrieve-kwarg-declaration-type/49324 "2020-10-30T20:19:47Z")

</div>

If I define a method: f(x; y::Int) = x \* y How can I retrieve the ::Int annotation on y, via reflection? I’ve poked around some of the method table properties, but can’t see it anywhere. It’s definitely stored somewher…

---

## [What are the consequences of really big primitive types?](https://discourse.julialang.org/t/what-are-the-consequences-of-really-big-primitive-types/49191)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 1\
**Last updated:** [October 29, 2020, 12:15pm UTC](https://discourse.julialang.org/t/what-are-the-consequences-of-really-big-primitive-types/49191 "2020-10-29T12:15:54Z")

</div>

one can declare arbitarily large primative types using the primative keyword. As far as i can tell they act like well behaved isbits types, no matter how large you make them. BitIntegers.jl uses this to allow the creat…

---

## [Symbolic computation in Julia with lisp/reduce; and calling Julia from LaTeX](https://discourse.julialang.org/t/symbolic-computation-in-julia-with-lisp-reduce-and-calling-julia-from-latex/2944)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 32\
**Last updated:** [October 29, 2020, 12:17am UTC](https://discourse.julialang.org/t/symbolic-computation-in-julia-with-lisp-reduce-and-calling-julia-from-latex/2944 "2020-10-29T00:17:47Z")

</div>

NOTE: the Reduce.jl package has been created since this discussion started Using Julia is a really great experience, thanks to all of you! Since Julia is so inspired by the lisp language, is it feasible to combine th…

---

## [Unnecessary type parameters](https://discourse.julialang.org/t/unnecessary-type-parameters/49100)

<div class="topic-metadata">

**Author:** [@lijas](https://discourse.julialang.org/u/lijas)\
**Replies:** 5\
**Last updated:** [October 27, 2020, 9:42am UTC](https://discourse.julialang.org/t/unnecessary-type-parameters/49100 "2020-10-27T09:42:58Z")

</div>

Quite often I have to use the type parameters to make the struct concrete/type stable, but I never need to use that parameter for dispatch. So the type parameter becomes unnecessary in some sense (and ugly). For example …

---

## [NamedArrays question / request](https://discourse.julialang.org/t/namedarrays-question-request/49021)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 6\
**Last updated:** [October 26, 2020, 11:17am UTC](https://discourse.julialang.org/t/namedarrays-question-request/49021 "2020-10-26T11:17:40Z")

</div>

Using NamedAarrays.jl I can define an array as: x = NamedArray( zeros(2,3,4), ( \[:A, :B\], \[:X, :Y, :Z\], 1:4 ), (:Dim1, :DimXYZ, :DimNum) ) I’d like to write it as: x = …

---

## [Should callers of iterate assert ::Union{Nothing,Tuple{Any,Any}}](https://discourse.julialang.org/t/should-callers-of-iterate-assert-union-nothing-tuple-any-any/48973)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 0\
**Last updated:** [October 25, 2020, 10:33am UTC](https://discourse.julialang.org/t/should-callers-of-iterate-assert-union-nothing-tuple-any-any/48973 "2020-10-25T10:33:17Z")

</div>

Because callers of iterate just destructure or use indexes, all kinds of hard to understand bugs can result from incorrectly implemented iterate methods. Eg struct Foo N::Int end function Base.iterate(foo::Foo, i =…

---

## [Which symbols are special cased in the same way as \`.\*\`, \`.+\`, etc](https://discourse.julialang.org/t/which-symbols-are-special-cased-in-the-same-way-as-etc/48849)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 5\
**Last updated:** [October 22, 2020, 10:15pm UTC](https://discourse.julialang.org/t/which-symbols-are-special-cased-in-the-same-way-as-etc/48849 "2020-10-22T22:15:33Z")

</div>

I am working on something in DataFramesMeta where I take an expression z = :x + :y if, like the expression above, the RHS is of the form +(:x, :y), then I can use DataFrames to create the object \[:x, :y\] =\> (+) =\> :y…

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

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