# Internals & Design

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

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

**Page:** 39

---

## [To Adopt mandatory semicolon in method calls if kwargs are passed](https://discourse.julialang.org/t/to-adopt-mandatory-semicolon-in-method-calls-if-kwargs-are-passed/43651)

<div class="topic-metadata">

**Author:** [@josePereiro](https://discourse.julialang.org/u/josePereiro)\
**Replies:** 7\
**Last updated:** [July 25, 2020, 4:11am UTC](https://discourse.julialang.org/t/to-adopt-mandatory-semicolon-in-method-calls-if-kwargs-are-passed/43651 "2020-07-25T04:11:50Z")

</div>

Hi, I make semicolon keys for living and I just wanna extend my market beyond C-like languages. Author Note: Initial joke for relaxing angry people because of the title A good and clear interpretation of semicolon in …

---

## [Can I get the declared return type of a method?](https://discourse.julialang.org/t/can-i-get-the-declared-return-type-of-a-method/43575)

<div class="topic-metadata">

**Author:** [@bobcassels](https://discourse.julialang.org/u/bobcassels)\
**Replies:** 20\
**Last updated:** [July 24, 2020, 3:02pm UTC](https://discourse.julialang.org/t/can-i-get-the-declared-return-type-of-a-method/43575 "2020-07-24T15:02:28Z")

</div>

f(a :: Int8, b :: Float32) :: Float64 = a + b I have found ways to get the types of arguments of a method, such as (first(methods(f))).sig. But I don’t see a way to get the return type I declared. Is there / could there…

---

## [Is broadcast possible over ternary expressions?](https://discourse.julialang.org/t/is-broadcast-possible-over-ternary-expressions/43518)

<div class="topic-metadata">

**Author:** [@tomerarnon](https://discourse.julialang.org/u/tomerarnon)\
**Replies:** 7\
**Last updated:** [July 23, 2020, 7:27pm UTC](https://discourse.julialang.org/t/is-broadcast-possible-over-ternary-expressions/43518 "2020-07-23T19:27:27Z")

</div>

I would love to be able to do something like the following: @. l \< u ? f!(x) : g!(x) I.e. \[li\<ui ? f!(xi) : g!(xi) for (li, ui, xi) in zip(l, u, x)\] However, expanding the first line, it’s clear that it won’t be equi…

---

## [Inferring loose container type based on elements that are added to it later?](https://discourse.julialang.org/t/inferring-loose-container-type-based-on-elements-that-are-added-to-it-later/43556)

<div class="topic-metadata">

**Author:** [@Benjia](https://discourse.julialang.org/u/Benjia)\
**Replies:** 10\
**Last updated:** [July 23, 2020, 5:39pm UTC](https://discourse.julialang.org/t/inferring-loose-container-type-based-on-elements-that-are-added-to-it-later/43556 "2020-07-23T17:39:15Z")

</div>

I often have functions that look like this, where I’m allocating some output vector and pushing some homogeneously typed objects onto it: julia\> function foo() out = \[\] push!(out, 1) ret…

---

## [Should \`inv\` be lazy?](https://discourse.julialang.org/t/should-inv-be-lazy/42786)

<div class="topic-metadata">

**Author:** [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Replies:** 24\
**Last updated:** [July 23, 2020, 6:55am UTC](https://discourse.julialang.org/t/should-inv-be-lazy/42786 "2020-07-23T06:55:12Z")

</div>

I was thinking about how inv is almost always the wrong thing to use in code, and how this primarily trips up people without significant linear algebra experience, and I realized that I think the following will be almos…

---

## [Meaning of copy for arrays](https://discourse.julialang.org/t/meaning-of-copy-for-arrays/43420)

<div class="topic-metadata">

**Author:** [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Replies:** 11\
**Last updated:** [July 21, 2020, 5:15pm UTC](https://discourse.julialang.org/t/meaning-of-copy-for-arrays/43420 "2020-07-21T17:15:45Z")

</div>

Is there a clear description of what “contract” copy(::AbstractArray) should implement? The docs are not very precise. We have the following examples: julia\> copy(1:6) # just returns the same immutable type 1:6 julia\> …

---

## [Don't let Pkg downgrade packages automatically](https://discourse.julialang.org/t/dont-let-pkg-downgrade-packages-automatically/43424)

<div class="topic-metadata">

**Author:** [@NightMachinary](https://discourse.julialang.org/u/NightMachinary)\
**Replies:** 10\
**Last updated:** [July 21, 2020, 12:16pm UTC](https://discourse.julialang.org/t/dont-let-pkg-downgrade-packages-automatically/43424 "2020-07-21T12:16:53Z")

</div>

I just installed Polynomials, which downgraded a bunch of my packages, and broke a lot of stuff. ERROR: LoadError: LoadError: UndefVarError: tostr\_sizehint not defined Stacktrace: \[1\] getproperty(::Module, ::Symbol) at…

---

## [Are Julia internals documented in depth somewhere or we need to read source code?](https://discourse.julialang.org/t/are-julia-internals-documented-in-depth-somewhere-or-we-need-to-read-source-code/43379)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 4\
**Last updated:** [July 21, 2020, 5:57am UTC](https://discourse.julialang.org/t/are-julia-internals-documented-in-depth-somewhere-or-we-need-to-read-source-code/43379 "2020-07-21T05:57:48Z")

</div>

Recently I need to check some properties of functions from Julia Base that was not mentioned in documentation. In such situation I know that few possible way to find answer. Read blog post/watch JuliaCon talk about thi…

---

## [Provide startup option to include current active environment in julia prompt](https://discourse.julialang.org/t/provide-startup-option-to-include-current-active-environment-in-julia-prompt/43306)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 7\
**Last updated:** [July 19, 2020, 2:04pm UTC](https://discourse.julialang.org/t/provide-startup-option-to-include-current-active-environment-in-julia-prompt/43306 "2020-07-19T14:04:33Z")

</div>

I just experienced the second occasion where I was trying to create a MWE for a bug report, but while creating the MWE I forgot that I was back in my @v1.4 environment rather than the environment in which I first encount…

---

## [Why "Int()" is capitalized and "float()" is not?](https://discourse.julialang.org/t/why-int-is-capitalized-and-float-is-not/43285)

<div class="topic-metadata">

**Author:** [@alusiani](https://discourse.julialang.org/u/alusiani)\
**Replies:** 7\
**Last updated:** [July 19, 2020, 6:19am UTC](https://discourse.julialang.org/t/why-int-is-capitalized-and-float-is-not/43285 "2020-07-19T06:19:51Z")

</div>

In order to force a number to be float I can use “float(1)”, to force an integer I can use “Int(1e7)”. I am curious about why Int() is capitalized and float() is not. The first is related to Int64 etc, the second one to …

---

## [Port Julia to the GraalVM](https://discourse.julialang.org/t/port-julia-to-the-graalvm/33194)

<div class="topic-metadata">

**Author:** [@KenziTrader](https://discourse.julialang.org/u/KenziTrader)\
**Replies:** 4\
**Last updated:** [July 18, 2020, 10:57am UTC](https://discourse.julialang.org/t/port-julia-to-the-graalvm/33194 "2020-07-18T10:57:16Z")

</div>

The GraalVM allows to combine code written in JVM-based languages such as Java, Scala, and Kotlin, but also other programming languages such as JavaScript, Ruby, Python, and R. I would like to be able to use Julia as wel…

---

## [Adjoint of Matrix is not a StridedArray?](https://discourse.julialang.org/t/adjoint-of-matrix-is-not-a-stridedarray/43038)

<div class="topic-metadata">

**Author:** [@SEA](https://discourse.julialang.org/u/SEA)\
**Replies:** 3\
**Last updated:** [July 17, 2020, 11:06pm UTC](https://discourse.julialang.org/t/adjoint-of-matrix-is-not-a-stridedarray/43038 "2020-07-17T23:06:02Z")

</div>

I am implementing a linear algebra routine for which I am trying to reuse an allocated array, but need to reshape it and take transposes of it. In this process, I noticed that no method exists for ldiv!(::LU, Adjoint{Fl…

---

## [When is threading going from experimental to production ready?](https://discourse.julialang.org/t/when-is-threading-going-from-experimental-to-production-ready/43167)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [July 16, 2020, 7:52am UTC](https://discourse.julialang.org/t/when-is-threading-going-from-experimental-to-production-ready/43167 "2020-07-16T07:52:49Z")

</div>

What does it mean, that threading is experimental and when does it be ready for production?

---

## [Let typeof(::Type{T}) where T = Type{T}](https://discourse.julialang.org/t/let-typeof-type-t-where-t-type-t/42938)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 13\
**Last updated:** [July 13, 2020, 6:33pm UTC](https://discourse.julialang.org/t/let-typeof-type-t-where-t-type-t/42938 "2020-07-13T18:33:24Z")

</div>

dispatching on function-like things can be quite tedious, as typeof as of now forgets information. While typeof(::Function) gives the function singleton type, typeof(::Type{T}) where T, i.e. typeof a Type-constructor, w…

---

## [Status of question mark syntax for missing values](https://discourse.julialang.org/t/status-of-question-mark-syntax-for-missing-values/27189)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 6\
**Last updated:** [July 12, 2020, 7:07pm UTC](https://discourse.julialang.org/t/status-of-question-mark-syntax-for-missing-values/27189 "2020-07-12T19:07:11Z")

</div>

I remember seeing a discussion somewhere about using the syntax T? to mean Union{T,Missing}. What was the outcome of this discussion? I personally find the syntax very clever, and it would help clean up a lot of code whe…

---

## [Given a Julia function \`f\` and its arguments \`agrs\` return typed Julia source code via a macro](https://discourse.julialang.org/t/given-a-julia-function-f-and-its-arguments-agrs-return-typed-julia-source-code-via-a-macro/42947)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 15\
**Last updated:** [July 12, 2020, 3:20pm UTC](https://discourse.julialang.org/t/given-a-julia-function-f-and-its-arguments-agrs-return-typed-julia-source-code-via-a-macro/42947 "2020-07-12T15:20:54Z")

</div>

Is there a macro for that? Or is it possible to write one? It’s always easier to understand via an example: function f(x,y) a = sqrt(x) b = x\*y return a + b end Macro call: @get\_typed\_source\_code f(1,2) f…

---

## [Why is splatting a non-iteratable allowed?](https://discourse.julialang.org/t/why-is-splatting-a-non-iteratable-allowed/42818)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 30\
**Last updated:** [July 12, 2020, 6:34am UTC](https://discourse.julialang.org/t/why-is-splatting-a-non-iteratable-allowed/42818 "2020-07-12T06:34:06Z")

</div>

Why is this allowed? julia\> \[1.0..., 2.0, 3.0\] 3-element Array{Float64,1}: 1.0 2.0 3.0 It strikes me as non-intuitive, and has already caused me some bugs. It’s especially weird when you think about it relative to …

---

## [Understanding better JIT and LLVM in Julia](https://discourse.julialang.org/t/understanding-better-jit-and-llvm-in-julia/42784)

<div class="topic-metadata">

**Author:** [@Fred](https://discourse.julialang.org/u/Fred)\
**Replies:** 3\
**Last updated:** [July 9, 2020, 3:37pm UTC](https://discourse.julialang.org/t/understanding-better-jit-and-llvm-in-julia/42784 "2020-07-09T15:37:58Z")

</div>

Hi, I am not specialist of compilers and I have a few questions about Julia design. 1- Julia is JIT compiled, because this design enable an interactive use in the REPL without the loss of performances of an interpreted…

---

## [Error in building Julia for Alpine Linux (ARM v7 32bits)](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225)

<div class="topic-metadata">

**Author:** [@RGerzaguet](https://discourse.julialang.org/u/RGerzaguet)\
**Replies:** 3\
**Last updated:** [July 5, 2020, 9:52am UTC](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225 "2020-07-05T09:52:06Z")

</div>

Hello folks I try to built Julia for a custom Alpine linux armv7 on Docker. The container I use is this one (https://github.com/balena-io-library/base-images/tree/master/balena-base-images/device-base/zc702-zynq7/alpine…

---

## [How to extract the Type of a generic struct and use it for pattern matching?](https://discourse.julialang.org/t/how-to-extract-the-type-of-a-generic-struct-and-use-it-for-pattern-matching/42371)

<div class="topic-metadata">

**Author:** [@Junars](https://discourse.julialang.org/u/Junars)\
**Replies:** 10\
**Last updated:** [July 1, 2020, 3:06pm UTC](https://discourse.julialang.org/t/how-to-extract-the-type-of-a-generic-struct-and-use-it-for-pattern-matching/42371 "2020-07-01T15:06:41Z")

</div>

I’m a novice, someone could help? here’s the demo code I want: struct Foo{T \<: Real} cont::String end bar = Foo{Int}("test") typeof(bar) == Foo{Int} # true # is there a package can do pattern match like this? @…

---

## [Suggestion Box: From a Julia neophyte](https://discourse.julialang.org/t/suggestion-box-from-a-julia-neophyte/42078)

<div class="topic-metadata">

**Author:** [@laut](https://discourse.julialang.org/u/laut)\
**Replies:** 9\
**Last updated:** [June 29, 2020, 3:56pm UTC](https://discourse.julialang.org/t/suggestion-box-from-a-julia-neophyte/42078 "2020-06-29T15:56:49Z")

</div>

I’m not sure where to post this so feel free to move this to a different section of the site if I missed the mark. I’m learning my way around Julia and life could be a bit simpler with some minor tweaks, here’s a wish l…

---

## [Codify best practices for custom types](https://discourse.julialang.org/t/codify-best-practices-for-custom-types/42176)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 2\
**Last updated:** [June 28, 2020, 1:46pm UTC](https://discourse.julialang.org/t/codify-best-practices-for-custom-types/42176 "2020-06-28T13:46:15Z")

</div>

The announcement for CSV.jl v0.7 includes this new capability: Custom types can now be passed in the … types keyword …, fast parsing is supported for all Integer and AbstractFloat types; other custom types need …

---

## [Improvement of string search in julia base](https://discourse.julialang.org/t/improvement-of-string-search-in-julia-base/41945)

<div class="topic-metadata">

**Author:** [@rryi](https://discourse.julialang.org/u/rryi)\
**Replies:** 5\
**Last updated:** [June 27, 2020, 1:48pm UTC](https://discourse.julialang.org/t/improvement-of-string-search-in-julia-base/41945 "2020-06-27T13:48:25Z")

</div>

I would like to contribute some performance optimization of the julia base search function: \_searchindex. I have prepared a benchmark package and experiments with several code variants here: https://github.com/rryi/Sea…

---

## [Update on latency and the typocalypse](https://discourse.julialang.org/t/update-on-latency-and-the-typocalypse/41753)

<div class="topic-metadata">

**Author:** [@jeff.bezanson](https://discourse.julialang.org/u/jeff.bezanson)\
**Replies:** 11\
**Last updated:** [June 21, 2020, 3:24pm UTC](https://discourse.julialang.org/t/update-on-latency-and-the-typocalypse/41753 "2020-06-21T15:24:35Z")

</div>

In the last few weeks we’ve managed to merge several latency-related PRs. Let’s take a moment to reflect on where we are. These are times for display(plot(rand(10))) (first time) on my system: v1.4: 19.8 seconds v1.5: …

---

## [Reverse domain notation?](https://discourse.julialang.org/t/reverse-domain-notation/41774)

<div class="topic-metadata">

**Author:** [@Gilga](https://discourse.julialang.org/u/Gilga)\
**Replies:** 3\
**Last updated:** [June 20, 2020, 4:04pm UTC](https://discourse.julialang.org/t/reverse-domain-notation/41774 "2020-06-20T16:04:34Z")

</div>

The reverse domain notation is used by companies to name their Java packages. So I’m wondering if this would also be practical for Julia projects? Example: Imagine an organisation has a domain called mycompany.org and…

---

## [Typeof(n\*n) in factorial](https://discourse.julialang.org/t/typeof-n-n-in-factorial/41700)

<div class="topic-metadata">

**Author:** [@binarygcd](https://discourse.julialang.org/u/binarygcd)\
**Replies:** 29\
**Last updated:** [June 20, 2020, 12:01pm UTC](https://discourse.julialang.org/t/typeof-n-n-in-factorial/41700 "2020-06-20T12:01:29Z")

</div>

The implementation of factorial in Base is function factorial(n::Integer) n \< 0 && throw(DomainError(n, "\`n\` must be nonnegative.")) f::typeof(n\*n) = 1 for i::typeof(n\*n) = 2:n f \*= i end ret…

---

## [Construct an immutable type from a Dict](https://discourse.julialang.org/t/construct-an-immutable-type-from-a-dict/26709)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 9\
**Last updated:** [June 20, 2020, 9:55am UTC](https://discourse.julialang.org/t/construct-an-immutable-type-from-a-dict/26709 "2020-06-20T09:55:16Z")

</div>

In development, I sometimes have an immutable type (for some reason, I do not want it to be mutable) with a large number of fields (5 in the following example), like struct A mass::Int velocity::String coordina…

---

## [Julia Intetnal](https://discourse.julialang.org/t/julia-intetnal/41768)

<div class="topic-metadata">

**Author:** [@Ravinder\_Ram](https://discourse.julialang.org/u/Ravinder_Ram)\
**Replies:** 1\
**Last updated:** [June 20, 2020, 3:32am UTC](https://discourse.julialang.org/t/julia-intetnal/41768 "2020-06-20T03:32:50Z")

</div>

I want to know each process from source code to native code… for ex:- “function sum(x,y) x+y end” how this source code compile?

---

## [Why no Base.Iterators.map?](https://discourse.julialang.org/t/why-no-base-iterators-map/14280)

<div class="topic-metadata">

**Author:** [@Orbots](https://discourse.julialang.org/u/Orbots)\
**Replies:** 12\
**Last updated:** [June 18, 2020, 11:01pm UTC](https://discourse.julialang.org/t/why-no-base-iterators-map/14280 "2020-06-18T23:01:42Z")

</div>

There is a Base.Iterators.filter, why no map? I see there used to be an imap function which was something like imap(f,a...) = (f(i...) for i in Iterators.zip(a...) ) which is what I have put in my local utilities …

---

## [Signal Handlers with Embedded Julia](https://discourse.julialang.org/t/signal-handlers-with-embedded-julia/41701)

<div class="topic-metadata">

**Author:** [@SMShane](https://discourse.julialang.org/u/SMShane)\
**Replies:** 0\
**Last updated:** [June 18, 2020, 9:57pm UTC](https://discourse.julialang.org/t/signal-handlers-with-embedded-julia/41701 "2020-06-18T21:57:36Z")

</div>

We are embedding Julia in a larger software suite on Linux/MacOS/Windows. This existing software makes use of some signal handlers and where it doesn’t some users expect behaviours such as Ctrl-C to interrupt to work. …

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

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