# Internals & Design

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

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

**Page:** 26

---

## [Compact syntax for combining \`Tuple\` and \`NamedTuple\`: \`(1, 2; x=2, y=3) == ((1, 2), (x=2, y=3))\`](https://discourse.julialang.org/t/compact-syntax-for-combining-tuple-and-namedtuple-1-2-x-2-y-3-1-2-x-2-y-3/78101)

<div class="topic-metadata">

**Author:** [@mtfishman](https://discourse.julialang.org/u/mtfishman)\
**Replies:** 15\
**Last updated:** [March 21, 2022, 9:08pm UTC](https://discourse.julialang.org/t/compact-syntax-for-combining-tuple-and-namedtuple-1-2-x-2-y-3-1-2-x-2-y-3/78101 "2022-03-21T21:08:22Z")

</div>

This may have been brought up already, but it would be nice to have a compact syntax for making a data structure that is a mixture of positional and keyword arguments. As an analogy to the function syntax f(1, 2; x=2, y…

---

## [Why is expanduser not used in abspath](https://discourse.julialang.org/t/why-is-expanduser-not-used-in-abspath/78136)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 5\
**Last updated:** [March 19, 2022, 7:25pm UTC](https://discourse.julialang.org/t/why-is-expanduser-not-used-in-abspath/78136 "2022-03-19T19:25:11Z")

</div>

I noticed that the tilde symbol is not handled by abspath. What function should I use to expand a path shorthand? julia\> expanduser("~/.julia") "/home/michael/.julia" julia\> abspath("~/.julia") "/home/michael/~/.julia"…

---

## [Difference handling missing of enumerate and eachindex](https://discourse.julialang.org/t/difference-handling-missing-of-enumerate-and-eachindex/78125)

<div class="topic-metadata">

**Author:** [@drandran12](https://discourse.julialang.org/u/drandran12)\
**Replies:** 3\
**Last updated:** [March 19, 2022, 2:10pm UTC](https://discourse.julialang.org/t/difference-handling-missing-of-enumerate-and-eachindex/78125 "2022-03-19T14:10:43Z")

</div>

The following behavior has cost me 6 hours of debugging. Is there a reason enumerate and eachindex handle the skipmissing itorator differently? julia\> a = \[missing, missing, missing, missing, missing, missing, missing, …

---

## [Broadcasting string interpolation](https://discourse.julialang.org/t/broadcasting-string-interpolation/78025)

<div class="topic-metadata">

**Author:** [@nielsls](https://discourse.julialang.org/u/nielsls)\
**Replies:** 2\
**Last updated:** [March 17, 2022, 1:16pm UTC](https://discourse.julialang.org/t/broadcasting-string-interpolation/78025 "2022-03-17T13:16:19Z")

</div>

Currently, this does not work: julia\> is = \[1,2\] 2-element Vector{Int64}: 1 2 julia\> "$.is" # currently a syntax error 2-element Vector{String}: "1" "2" But it should, right? For completeness sake? Allowing $. a…

---

## [Unzip function](https://discourse.julialang.org/t/unzip-function/77959)

<div class="topic-metadata">

**Author:** [@Cevheriferd](https://discourse.julialang.org/u/Cevheriferd)\
**Replies:** 2\
**Last updated:** [March 16, 2022, 12:14pm UTC](https://discourse.julialang.org/t/unzip-function/77959 "2022-03-16T12:14:51Z")

</div>

Basically addressing the issue here. Is there a reason this function has not been implemented yet?

---

## [Accessing and changing struct fields using a dictionary](https://discourse.julialang.org/t/accessing-and-changing-struct-fields-using-a-dictionary/77954)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 1\
**Last updated:** [March 16, 2022, 8:45am UTC](https://discourse.julialang.org/t/accessing-and-changing-struct-fields-using-a-dictionary/77954 "2022-03-16T08:45:57Z")

</div>

Hi, I have a struct where I to change its attributes value using a dictionary. For example using Agents: AbstractAgent mutable struct Casualty \<: AbstractAgent id :: Int pos :: Tuple{Int,Int,Float64} trauma :: In…

---

## [Indexing \`OrderedDict\`s by index instead of key](https://discourse.julialang.org/t/indexing-ordereddict-s-by-index-instead-of-key/77846)

<div class="topic-metadata">

**Author:** [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Replies:** 3\
**Last updated:** [March 14, 2022, 9:11pm UTC](https://discourse.julialang.org/t/indexing-ordereddict-s-by-index-instead-of-key/77846 "2022-03-14T21:11:53Z")

</div>

One can access values of OrderedDicts by their index by exposing the internal vals field, like so: julia\> od = sort(Dict('a'=\>'A', 'b'=\>'B')) OrderedCollections.OrderedDict{Char, Char} with 2 entries: 'a' =\> 'A' 'b'…

---

## [How to check whether profiling is supported](https://discourse.julialang.org/t/how-to-check-whether-profiling-is-supported/77882)

<div class="topic-metadata">

**Author:** [@Uroc327](https://discourse.julialang.org/u/Uroc327)\
**Replies:** 0\
**Last updated:** [March 14, 2022, 5:33pm UTC](https://discourse.julialang.org/t/how-to-check-whether-profiling-is-supported/77882 "2022-03-14T17:33:10Z")

</div>

How can I check whether a julia binary was built with USE\_PERF\_JITEVENTS=1? It seems to be default on linux platforms, but is there any way to query this? I wonder if I have to build julia from source for profiling or i…

---

## [Would a function istypestable(foo, x) make sense for beginners?](https://discourse.julialang.org/t/would-a-function-istypestable-foo-x-make-sense-for-beginners/76696)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 6\
**Last updated:** [March 13, 2022, 4:06pm UTC](https://discourse.julialang.org/t/would-a-function-istypestable-foo-x-make-sense-for-beginners/76696 "2022-03-13T16:06:26Z")

</div>

Given the importance for performances of type stability, I wonder if the @code\_warntype macro, where the type stability is somehow hidden in the type of Body: is the easiest pick for newcomers or if instead a simpler ist…

---

## [Piping and broadcasting](https://discourse.julialang.org/t/piping-and-broadcasting/77765)

<div class="topic-metadata">

**Author:** [@kumarbalachandran](https://discourse.julialang.org/u/kumarbalachandran)\
**Replies:** 1\
**Last updated:** [March 11, 2022, 6:51pm UTC](https://discourse.julialang.org/t/piping-and-broadcasting/77765 "2022-03-11T18:51:39Z")

</div>

I was trying the pipe symbol and I noticed a quirk that probably makes sense with the precedence rules but it leaves something to be desired in expressiveness: julia\> (1,2,3) .|\> - (-1, -2, -3) julia\> (1,2,3) .|\> sin .|\>…

---

## [Julia shoudn't silently activate a project associated to a previous Julia version](https://discourse.julialang.org/t/julia-shoudnt-silently-activate-a-project-associated-to-a-previous-julia-version/77480)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [March 7, 2022, 3:17am UTC](https://discourse.julialang.org/t/julia-shoudnt-silently-activate-a-project-associated-to-a-previous-julia-version/77480 "2022-03-07T03:17:51Z")

</div>

I have just tested Julia1.8, the first minor version after the changes in Manifest.toml of 1.7 and got a bit surprised that it activated my 1.7-made project without even a warning. I admit I didn’t follow the discussion…

---

## [AoT / JIT and runtime constant folding](https://discourse.julialang.org/t/aot-jit-and-runtime-constant-folding/77226)

<div class="topic-metadata">

**Author:** [@yarnton](https://discourse.julialang.org/u/yarnton)\
**Replies:** 4\
**Last updated:** [March 2, 2022, 8:23am UTC](https://discourse.julialang.org/t/aot-jit-and-runtime-constant-folding/77226 "2022-03-02T08:23:49Z")

</div>

I have no understanding at all of Julia’s internals, and I was wondering how much constant folding the current compiler is able to do at runtime? Basically, I am facing a case which I believe is pretty common and I was …

---

## [Interpreted and compiled hybrid](https://discourse.julialang.org/t/interpreted-and-compiled-hybrid/77170)

<div class="topic-metadata">

**Author:** [@dklonaros](https://discourse.julialang.org/u/dklonaros)\
**Replies:** 4\
**Last updated:** [February 28, 2022, 12:53pm UTC](https://discourse.julialang.org/t/interpreted-and-compiled-hybrid/77170 "2022-02-28T12:53:15Z")

</div>

I love Julia’s efficiency and the speed with which I can complete certain tasks once it is compiled. The only slight gripe I have as a data scientist, especially when exploring large datasets, is the time needed in the b…

---

## [Opt-in \[compat\] tests ok ? augment ver list;](https://discourse.julialang.org/t/opt-in-compat-tests-ok-augment-ver-list/77048)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 5\
**Last updated:** [February 25, 2022, 2:51pm UTC](https://discourse.julialang.org/t/opt-in-compat-tests-ok-augment-ver-list/77048 "2022-02-25T14:51:46Z")

</div>

The introduction of a new version for a \[compat\] listed package results in nonempty status --outdated often enough that a safe opt-in way of reducing these events is desirable. To ensure the processing happen only if th…

---

## [Base.@kwdef](https://discourse.julialang.org/t/base-kwdef/76875)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 8\
**Last updated:** [February 22, 2022, 11:00pm UTC](https://discourse.julialang.org/t/base-kwdef/76875 "2022-02-22T23:00:49Z")

</div>

I know it’s been discussed before. Can this be made the way structs work? default values in the struct definition; constructors can use keyword arguments. And, of course, constructors can continue to use positional a…

---

## [Zero and zerounit, analogous to one and oneunit?](https://discourse.julialang.org/t/zero-and-zerounit-analogous-to-one-and-oneunit/76841)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 2\
**Last updated:** [February 21, 2022, 2:24pm UTC](https://discourse.julialang.org/t/zero-and-zerounit-analogous-to-one-and-oneunit/76841 "2022-02-21T14:24:57Z")

</div>

Following this reasoning, shouldn’t we also have zerounit for consistency? zero can be defined as the additive identity. I find it very strange that we need to write code with a mix of oneunit and zero instead of oneuni…

---

## [Const vs zero argument function](https://discourse.julialang.org/t/const-vs-zero-argument-function/76770)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 4\
**Last updated:** [February 19, 2022, 9:19pm UTC](https://discourse.julialang.org/t/const-vs-zero-argument-function/76770 "2022-02-19T21:19:57Z")

</div>

In Julia, we have both trivial zero argument functions and constants a() = 7 const A = 8 Both support constant propagation: f(x) = x+a() g(x) = x+A @code\_llvm f(0) ; @ REPL\[3\]:1 within \`f\` define i64 @julia\_f\_140(i64…

---

## [Comments on "Transducers & Effects – Mike Innes"](https://discourse.julialang.org/t/comments-on-transducers-effects-mike-innes/41353)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 4\
**Last updated:** [February 17, 2022, 6:03pm UTC](https://discourse.julialang.org/t/comments-on-transducers-effects-mike-innes/41353 "2022-02-17T18:03:52Z")

</div>

In a slack channel, Ari Katz notified me about @MikeInnes’s blog post Transducers & Effects – Mike Innes. It’s nice that there are more attentions to transducers! So, I wanted to write some comments somewhere but I did…

---

## [Profiling Revised Base](https://discourse.julialang.org/t/profiling-revised-base/76599)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 2\
**Last updated:** [February 17, 2022, 3:14am UTC](https://discourse.julialang.org/t/profiling-revised-base/76599 "2022-02-17T03:14:49Z")

</div>

After running Revise.track(Base) and editing files in Base, @profile & Profile.print() give wrong line numbers. Is there a way around this?

---

## [An experiment for Python Style (but Unidirectional) Generators for Julia](https://discourse.julialang.org/t/an-experiment-for-python-style-but-unidirectional-generators-for-julia/76451)

<div class="topic-metadata">

**Author:** [@complyue](https://discourse.julialang.org/u/complyue)\
**Replies:** 8\
**Last updated:** [February 16, 2022, 8:47am UTC](https://discourse.julialang.org/t/an-experiment-for-python-style-but-unidirectional-generators-for-julia/76451 "2022-02-16T08:47:47Z")

</div>

I find it’s fairly trivial to implement Python style generator functions for Julia, though only unidirectional stream production. I use yieldto but doc says “Its use is discouraged.”, how idiomatic my approach is? I’m f…

---

## [Module with Main.BakedPackage in its dependencies](https://discourse.julialang.org/t/module-with-main-bakedpackage-in-its-dependencies/76300)

<div class="topic-metadata">

**Author:** [@1ozturkbe](https://discourse.julialang.org/u/1ozturkbe)\
**Replies:** 8\
**Last updated:** [February 13, 2022, 2:18pm UTC](https://discourse.julialang.org/t/module-with-main-bakedpackage-in-its-dependencies/76300 "2022-02-13T14:18:57Z")

</div>

I have been working on a package for a while, that uses another package that is baked into Main by necessity (which I will called Main.BakedPackage for now). Its format is the following: module MyPackage ... usi…

---

## [Whitespace sensitivity](https://discourse.julialang.org/t/whitespace-sensitivity/76211)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 46\
**Last updated:** [February 13, 2022, 5:42am UTC](https://discourse.julialang.org/t/whitespace-sensitivity/76211 "2022-02-13T05:42:07Z")

</div>

When is Julia whitespace sensitvie? There are line endings to finish an expression, can be replaced with ;. I recently came across julia\> \[randn(2, 3) randn(2, 3)\] 4×3 Matrix{Float64}: -0.0609315 0.3…

---

## [Is it possible to import everything but?](https://discourse.julialang.org/t/is-it-possible-to-import-everything-but/70945)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 9\
**Last updated:** [February 10, 2022, 6:22pm UTC](https://discourse.julialang.org/t/is-it-possible-to-import-everything-but/70945 "2022-02-10T18:22:34Z")

</div>

Both PlutoUI and Makie export Slider. It seems like the right type name for each, but causes naming conflics in notebooks. One then has to qualify the usage by PlutoUI.Slider. Is it possible to import everything but Slid…

---

## [Should \`literal\_pow\` optimize for bigger exponents?](https://discourse.julialang.org/t/should-literal-pow-optimize-for-bigger-exponents/76167)

<div class="topic-metadata">

**Author:** [@MarcMush](https://discourse.julialang.org/u/MarcMush)\
**Replies:** 15\
**Last updated:** [February 10, 2022, 4:44pm UTC](https://discourse.julialang.org/t/should-literal-pow-optimize-for-bigger-exponents/76167 "2022-02-10T16:44:54Z")

</div>

Base.literal\_pow allows x^2 and x^3 to be turned into x\*x and x\*x\*x, turning it into very efficient machine code. I was wondering if it could be extended to higher exponents. The function I used for this is this one: Ba…

---

## [Typeconst proposal](https://discourse.julialang.org/t/typeconst-proposal/75953)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 33\
**Last updated:** [February 9, 2022, 8:34pm UTC](https://discourse.julialang.org/t/typeconst-proposal/75953 "2022-02-09T20:34:35Z")

</div>

Great discussion, which added a lot of nuances and explicit advice based on use cases. The difficulty of expressing this so clearly might suggest that the keyword const is a misnomer, though it helps the Julia compiler …

---

## [Inconsistent behavior between two- and three-argument methods of \`ldiv!\`](https://discourse.julialang.org/t/inconsistent-behavior-between-two-and-three-argument-methods-of-ldiv/76102)

<div class="topic-metadata">

**Author:** [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Replies:** 0\
**Last updated:** [February 9, 2022, 4:41pm UTC](https://discourse.julialang.org/t/inconsistent-behavior-between-two-and-three-argument-methods-of-ldiv/76102 "2022-02-09T16:41:55Z")

</div>

While implementing methods for \\ and ldiv! for diagonal GPUArrays , (see this PR in case you’re interested) I noticed that the two and three-argument versions of \`ldiv! don’t have the same behavior for singular diagonal …

---

## [Why Julia doesn't have function types?](https://discourse.julialang.org/t/why-julia-doesnt-have-function-types/75934)

<div class="topic-metadata">

**Author:** [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Replies:** 25\
**Last updated:** [February 8, 2022, 5:36am UTC](https://discourse.julialang.org/t/why-julia-doesnt-have-function-types/75934 "2022-02-08T05:36:25Z")

</div>

I was wondering what’s the reason that in Julia we don’t have function types based on input variables, and output variables respective types. I mean, f(x::Int) = x would be of type Function{input\<: Int} while f(x::Int)::…

---

## [MultiFunctions: Context dispatch and binary cache](https://discourse.julialang.org/t/multifunctions-context-dispatch-and-binary-cache/11565)

<div class="topic-metadata">

**Author:** [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Replies:** 9\
**Last updated:** [July 16, 2018, 5:22pm UTC](https://discourse.julialang.org/t/multifunctions-context-dispatch-and-binary-cache/11565 "2018-07-16T17:22:46Z")

</div>

I have been writing this draft for several days , and got a little mixed up verbalising these ideas , which are simpler to understand using code and examples… If you want to jump straight into code, there is a link at t…

---

## [\`not\`, \`and\`, \`or\` as logical operator keyword](https://discourse.julialang.org/t/not-and-or-as-logical-operator-keyword/75933)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 9\
**Last updated:** [February 7, 2022, 12:36pm UTC](https://discourse.julialang.org/t/not-and-or-as-logical-operator-keyword/75933 "2022-02-07T12:36:15Z")

</div>

https://github.com/JuliaLang/julia/issues/5238 I guess many people want to use not, and, or as logical operator keyword. I prefer if A and not B foo() end rather than if A && !B foo() end because above one i…

---

## [Confusing output of status --outdated while trying out a PR branch](https://discourse.julialang.org/t/confusing-output-of-status-outdated-while-trying-out-a-pr-branch/75707)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 2\
**Last updated:** [February 3, 2022, 10:18am UTC](https://discourse.julialang.org/t/confusing-output-of-status-outdated-while-trying-out-a-pr-branch/75707 "2022-02-03T10:18:29Z")

</div>

I’m trying out an unregistered branch of MKL (@v1.8) pkg\> activate --temp Activating new project at \`/tmp/jl\_LRkm83\` (jl\_LRkm83) pkg\> add https://github.com/JuliaLinearAlgebra/MKL.jl#vs/lp64 Updating git-repo \`ht…

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

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