# Internals & Design

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

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

**Page:** 31

---

## [Golang-like member functions](https://discourse.julialang.org/t/golang-like-member-functions/65254)

<div class="topic-metadata">

**Author:** [@peteole](https://discourse.julialang.org/u/peteole)\
**Replies:** 12\
**Last updated:** [July 27, 2021, 7:30am UTC](https://discourse.julialang.org/t/golang-like-member-functions/65254 "2021-07-27T07:30:58Z")

</div>

Hi, I recently found out about the notation for callables: function (obj::MyType)(x::Int) return obj.mymember\*x end I realized this syntax is extremely similar to the golang and rust-notation for member functions. …

---

## [Why isn't minmax branchless?](https://discourse.julialang.org/t/why-isnt-minmax-branchless/64854)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 22\
**Last updated:** [July 20, 2021, 5:59am UTC](https://discourse.julialang.org/t/why-isnt-minmax-branchless/64854 "2021-07-20T05:59:19Z")

</div>

minmax for two numbers is defined by My question is: why not make it branchless with minmax(x, y) = ifelse(isless(x, y), (x, y), (y, x))

---

## [Could separating private attribute access help performance?](https://discourse.julialang.org/t/could-separating-private-attribute-access-help-performance/64881)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [July 19, 2021, 2:58am UTC](https://discourse.julialang.org/t/could-separating-private-attribute-access-help-performance/64881 "2021-07-19T02:58:10Z")

</div>

Suppose Julia distinguished between private and public attributes struct Foo @public u a b end so that public access x.u was allowed but access to private attributes from outside the module needed getprivate(x, …

---

## [Run-time Dynamic type-casting (RTTI)](https://discourse.julialang.org/t/run-time-dynamic-type-casting-rtti/64852)

<div class="topic-metadata">

**Author:** [@JerryM](https://discourse.julialang.org/u/JerryM)\
**Replies:** 7\
**Last updated:** [July 18, 2021, 5:11pm UTC](https://discourse.julialang.org/t/run-time-dynamic-type-casting-rtti/64852 "2021-07-18T17:11:30Z")

</div>

Hello, in ANSI C/C++, C#, Rust etc. there is MISSING this type of dynamic casting: struct MyStruct { int item; }; MyStruct ms; char dynTypeName\[\] = "MyStruct"; void \*ptr; ptr = &ms; dynamic\_cast\<dynTypeName\>(ptr)-\>item…

---

## [Julia-1.6.2 cannot be compiled](https://discourse.julialang.org/t/julia-1-6-2-cannot-be-compiled/64685)

<div class="topic-metadata">

**Author:** [@DKad](https://discourse.julialang.org/u/DKad)\
**Replies:** 2\
**Last updated:** [July 15, 2021, 4:11pm UTC](https://discourse.julialang.org/t/julia-1-6-2-cannot-be-compiled/64685 "2021-07-15T16:11:10Z")

</div>

I just tried to compile julia-1.6.2 and got the following error: ERROR: Unable to load dependent library /giga/opt/julia-1.6.2/usr/bin/…/lib/libjulia-internal.so.1 Message:/giga/opt/julia-1.6.2/usr/bin/…/lib/libstdc++.…

---

## [Regarding \`getproperty\` and public vs. private APIs](https://discourse.julialang.org/t/regarding-getproperty-and-public-vs-private-apis/63059)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 26\
**Last updated:** [July 15, 2021, 8:14am UTC](https://discourse.julialang.org/t/regarding-getproperty-and-public-vs-private-apis/63059 "2021-07-15T08:14:48Z")

</div>

The syntax x.f calls getproperty which is very widely used. Don’t confuse it with getfield which is the default fallback of getproperty.

---

## [Code\_llvm and and code\_native should return their output](https://discourse.julialang.org/t/code-llvm-and-and-code-native-should-return-their-output/64581)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 9\
**Last updated:** [July 14, 2021, 9:46am UTC](https://discourse.julialang.org/t/code-llvm-and-and-code-native-should-return-their-output/64581 "2021-07-14T09:46:07Z")

</div>

As it stands code\_typed returns its output, but code\_llvm and code\_native return Nothing and instead print their output to an io stream. I would like to propose that all three have no side effects and return some kind of…

---

## [Backing up or Syncing the artifact directory](https://discourse.julialang.org/t/backing-up-or-syncing-the-artifact-directory/64457)

<div class="topic-metadata">

**Author:** [@mbee](https://discourse.julialang.org/u/mbee)\
**Replies:** 4\
**Last updated:** [July 13, 2021, 10:21pm UTC](https://discourse.julialang.org/t/backing-up-or-syncing-the-artifact-directory/64457 "2021-07-13T22:21:52Z")

</div>

From a use case point of view this is a beginner question, but I think it is better answered here: I have a portable Windows ‘installation’ of Julia at v:/bin/julia, including v:/bin/julia/.julia/artifacts. I am synchro…

---

## [Does the GC respond based on memory pressure?](https://discourse.julialang.org/t/does-the-gc-respond-based-on-memory-pressure/64592)

<div class="topic-metadata">

**Author:** [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Replies:** 3\
**Last updated:** [July 13, 2021, 8:52pm UTC](https://discourse.julialang.org/t/does-the-gc-respond-based-on-memory-pressure/64592 "2021-07-13T20:52:50Z")

</div>

I.e. is it more or less aggressive depending on what the OS tells it about available memory? Or does it do the same things regardless of the memory pressure. I’m asking because I’m not sure how to communicate that memory…

---

## [The mime type of julia code, and it's usage in show and repr](https://discourse.julialang.org/t/the-mime-type-of-julia-code-and-its-usage-in-show-and-repr/64465)

<div class="topic-metadata">

**Author:** [@binary\_cat](https://discourse.julialang.org/u/binary_cat)\
**Replies:** 1\
**Last updated:** [July 11, 2021, 11:07pm UTC](https://discourse.julialang.org/t/the-mime-type-of-julia-code-and-its-usage-in-show-and-repr/64465 "2021-07-11T23:07:16Z")

</div>

I can’t find anything about it online, and there don’t seem to be any methods using it in julia, so I decided to ask here. Something like text/julia (or maybe text/x-julia for standard compliance?) is what I would expec…

---

## [Syntax for binding type paramaters in a function with a return type is obscure and unintuitive](https://discourse.julialang.org/t/syntax-for-binding-type-paramaters-in-a-function-with-a-return-type-is-obscure-and-unintuitive/63768)

<div class="topic-metadata">

**Author:** [@binary\_cat](https://discourse.julialang.org/u/binary_cat)\
**Replies:** 7\
**Last updated:** [July 11, 2021, 4:44pm UTC](https://discourse.julialang.org/t/syntax-for-binding-type-paramaters-in-a-function-with-a-return-type-is-obscure-and-unintuitive/63768 "2021-07-11T16:44:18Z")

</div>

I’ve been having trouble with this, and I finally found out why. It has to do with the precedence of :: and where in function signatures. Here’s an example of where this goes wrong: firstint(a::Vector{T})::Int where {…

---

## [Use two system images programmatically in C](https://discourse.julialang.org/t/use-two-system-images-programmatically-in-c/64374)

<div class="topic-metadata">

**Author:** [@benoit](https://discourse.julialang.org/u/benoit)\
**Replies:** 0\
**Last updated:** [July 9, 2021, 6:34pm UTC](https://discourse.julialang.org/t/use-two-system-images-programmatically-in-c/64374 "2021-07-09T18:34:50Z")

</div>

I saw that it is possible to boot Julia with up to 2 sysimages by using the -J argument. I was wondering if it possible to do the same thing programmatically in C? I did not see any options other than jl\_options.image\_…

---

## ["Nightly" allocates but 1.6 doesn't](https://discourse.julialang.org/t/nightly-allocates-but-1-6-doesnt/64118)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 3\
**Last updated:** [July 9, 2021, 1:27pm UTC](https://discourse.julialang.org/t/nightly-allocates-but-1-6-doesnt/64118 "2021-07-09T13:27:35Z")

</div>

In KeywordCalls.jl we have some tests like this: @testset "No Allocation" begin @test 0 == @ballocated f(a=1, b=2, c=3) @test 0 == @ballocated f((a=1, b=2, c=3)) @test 0 == @ballocat…

---

## [Array indexing](https://discourse.julialang.org/t/array-indexing/64095)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 7\
**Last updated:** [July 5, 2021, 10:43pm UTC](https://discourse.julialang.org/t/array-indexing/64095 "2021-07-05T22:43:14Z")

</div>

Hey Julianners, Are there a way to ha a syntax like this: arrofarr = \[randn(2,4) for \_ in 1:10\] arrofarr\[7:end\]\[1:2,3:end\] # would select a \[4\] x \[2,2\] dim array. Is this possible? It would be really clean and it coul…

---

## [Reason to remove address spaces](https://discourse.julialang.org/t/reason-to-remove-address-spaces/63932)

<div class="topic-metadata">

**Author:** [@KavinduZoysa](https://discourse.julialang.org/u/KavinduZoysa)\
**Replies:** 8\
**Last updated:** [July 2, 2021, 7:22pm UTC](https://discourse.julialang.org/t/reason-to-remove-address-spaces/63932 "2021-07-02T19:22:51Z")

</div>

Hi all, Can you please help me to understand the reason to remove address spaces as shown in julia/llvm-remove-addrspaces.cpp at 5650c93f1aa45a17c10c9482e5d3e0042cf4cc6b · JuliaLang/julia · GitHub Thank you, Kavindu

---

## [Svec not documented](https://discourse.julialang.org/t/svec-not-documented/63945)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 3\
**Last updated:** [July 2, 2021, 5:11pm UTC](https://discourse.julialang.org/t/svec-not-documented/63945 "2021-07-02T17:11:31Z")

</div>

Hello! I know that it is a very “internals” thing, but svec is not documented anywhere in the docs. Also, this is rather unhelpful: help?\> Core.svec No documentation found. Core.svec is a Function. # built-in f…

---

## [Suggestion: use PEP-like process for changes](https://discourse.julialang.org/t/suggestion-use-pep-like-process-for-changes/63494)

<div class="topic-metadata">

**Author:** [@paulmelis](https://discourse.julialang.org/u/paulmelis)\
**Replies:** 37\
**Last updated:** [June 30, 2021, 8:06am UTC](https://discourse.julialang.org/t/suggestion-use-pep-like-process-for-changes/63494 "2021-06-30T08:06:00Z")

</div>

Meta-point in response this remark by @skoffer (with which I agree): with other languages, say Python and Go, more structured processes to discuss possible language evolution and improvements have been put in place over…

---

## [Shouldn't there be a warning when package can't update to latest?](https://discourse.julialang.org/t/shouldnt-there-be-a-warning-when-package-cant-update-to-latest/51446)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 32\
**Last updated:** [June 30, 2021, 3:59am UTC](https://discourse.julialang.org/t/shouldnt-there-be-a-warning-when-package-cant-update-to-latest/51446 "2021-06-30T03:59:17Z")

</div>

Hellooo, So I just used up Plots which updated it to v1.7.3. When I went to the github page, I saw that the latest release was 1.9.1. So I used up Plots@v1.9.1 to force installation of the latest release and to see wha…

---

## [Forbidding feature branches on JuliaLang/julia repo](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 10\
**Last updated:** [June 27, 2021, 12:03pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154 "2021-06-27T12:03:20Z")

</div>

Right now the JuliaLang/julia has 914 branches. I am pretty suire the majority of which are stale feature branches, where someone started to implement a feature and then for some reason stopped. Taking a look, in many…

---

## [Gtk.jl fails to precompile with Julia v1.7.0-beta2](https://discourse.julialang.org/t/gtk-jl-fails-to-precompile-with-julia-v1-7-0-beta2/63603)

<div class="topic-metadata">

**Author:** [@magister-ludi](https://discourse.julialang.org/u/magister-ludi)\
**Replies:** 5\
**Last updated:** [June 26, 2021, 10:06pm UTC](https://discourse.julialang.org/t/gtk-jl-fails-to-precompile-with-julia-v1-7-0-beta2/63603 "2021-06-26T22:06:06Z")

</div>

Gtk.jl fails to precompile with julia v1.7.0-beta2. This is under Windows (Win10) and Linux (OpenSUSE Leap 15.2). In both systems, I have a clean install, with the addition of Gtk: (@v1.7) pkg\> st Status \`C:\\User…

---

## [What are the current plans regarding a new LTS Julia version?](https://discourse.julialang.org/t/what-are-the-current-plans-regarding-a-new-lts-julia-version/63501)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 33\
**Last updated:** [June 26, 2021, 12:44am UTC](https://discourse.julialang.org/t/what-are-the-current-plans-regarding-a-new-lts-julia-version/63501 "2021-06-26T00:44:56Z")

</div>

Sorry if this has already been answered somewhere: there are so many really cool substantial changes/improvements in v1.7, and it looks like quite a few of them will be hard or impossible to cover via Compat.jl. So it ma…

---

## [Julia 2.0: superSwitch or SuperCase ... or generalized if-then-else statement](https://discourse.julialang.org/t/julia-2-0-superswitch-or-supercase-or-generalized-if-then-else-statement/63529)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 3\
**Last updated:** [June 25, 2021, 8:30pm UTC](https://discourse.julialang.org/t/julia-2-0-superswitch-or-supercase-or-generalized-if-then-else-statement/63529 "2021-06-25T20:30:38Z")

</div>

Julia doesn’t have a switch/case statement. I recall reading the past that @StefanKarpinski tried to interest the other developers back in the day, but couldn’t get them excited about it. That makes some sense – early on…

---

## [Julia subsumes ICON: well done](https://discourse.julialang.org/t/julia-subsumes-icon-well-done/63517)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 3\
**Last updated:** [June 25, 2021, 7:30pm UTC](https://discourse.julialang.org/t/julia-subsumes-icon-well-done/63517 "2021-06-25T19:30:36Z")

</div>

I developed a likely poor-supported belief the developers where re-evaluating Julia’s string functionality for Julia 2.0 from some off-hand comment that @StefanKarpinski made in some post. That’s an interest area of min…

---

## [Error messages in for loops](https://discourse.julialang.org/t/error-messages-in-for-loops/63562)

<div class="topic-metadata">

**Author:** [@SirLukeSchande](https://discourse.julialang.org/u/SirLukeSchande)\
**Replies:** 5\
**Last updated:** [June 25, 2021, 4:47pm UTC](https://discourse.julialang.org/t/error-messages-in-for-loops/63562 "2021-06-25T16:47:25Z")

</div>

I was just working on my code and got an error where the stacktrace pointed to a line inside a for loop. To debug the code I was about to print the for-loop-variable to find out in which iteration the error happened. Wo…

---

## [Julia v1.7.0, \\ and newline](https://discourse.julialang.org/t/julia-v1-7-0-and-newline/63441)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 2\
**Last updated:** [June 23, 2021, 2:26pm UTC](https://discourse.julialang.org/t/julia-v1-7-0-and-newline/63441 "2021-06-23T14:26:10Z")

</div>

Julia 1.7.0-beta2 allows \\ to remove the newline as in txt = "This is a long \\ line" println(txt) to print as This is a long line Nice, but this does not work with the Windows standard \\r\\n. I guess this could easil…

---

## [(not to be taken seriously) ideas about modules and packages](https://discourse.julialang.org/t/not-to-be-taken-seriously-ideas-about-modules-and-packages/62672)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 9\
**Last updated:** [June 22, 2021, 11:17pm UTC](https://discourse.julialang.org/t/not-to-be-taken-seriously-ideas-about-modules-and-packages/62672 "2021-06-22T23:17:06Z")

</div>

These ideas are in the direction of dealing with some of the issues encountered when developing large modular packages. Currently (I agree) that the flexibility of the module system of Julia has some trade-offs relative …

---

## [Including Named Dimensions in Base](https://discourse.julialang.org/t/including-named-dimensions-in-base/63314)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 2\
**Last updated:** [June 21, 2021, 6:16pm UTC](https://discourse.julialang.org/t/including-named-dimensions-in-base/63314 "2021-06-21T18:16:21Z")

</div>

I’m aware of at least seven different packages trying to add the capability to name dimensions of an array to Julia – AxisArrays, NamedDims, AxisKeys, AxisIndices, NamedArrays, LabelledArrays, and IndexedDims. Suffice it…

---

## [Suggestion: Fortran-like Keyword to Assert Function is Pure](https://discourse.julialang.org/t/suggestion-fortran-like-keyword-to-assert-function-is-pure/63047)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 62\
**Last updated:** [June 20, 2021, 6:04pm UTC](https://discourse.julialang.org/t/suggestion-fortran-like-keyword-to-assert-function-is-pure/63047 "2021-06-20T18:04:08Z")

</div>

I don’t know if this is possible or how much work it would be, but I’d like it if there was some kind of keyword like pure function f() that throws an error if the function being compiled is not pure. I’ve definitely fac…

---

## [\`eps()\` (epsilon) for Complex floats?](https://discourse.julialang.org/t/eps-epsilon-for-complex-floats/59603)

<div class="topic-metadata">

**Author:** [@JeffFessler](https://discourse.julialang.org/u/JeffFessler)\
**Replies:** 4\
**Last updated:** [June 17, 2021, 5:23pm UTC](https://discourse.julialang.org/t/eps-epsilon-for-complex-floats/59603 "2021-06-17T17:23:40Z")

</div>

It is surprising to me that eps(Complex{Float32}) is unsupported currently, given that there are many applications involving complex data where one would like to specify the precision of some operation appropriately. A …

---

## [No automatic type promotion for parametric structs](https://discourse.julialang.org/t/no-automatic-type-promotion-for-parametric-structs/62664)

<div class="topic-metadata">

**Author:** [@lungben](https://discourse.julialang.org/u/lungben)\
**Replies:** 8\
**Last updated:** [June 16, 2021, 1:12pm UTC](https://discourse.julialang.org/t/no-automatic-type-promotion-for-parametric-structs/62664 "2021-06-16T13:12:39Z")

</div>

When using different (but convertible) types in a constructor, for “standard” structs the types get converted automatically, e.g. struct Struct1 x:: Float64 y end s1b = Struct1(5, 1) # output: Struct1b(5.0, 1) …

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

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