# Internals & Design

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

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

**Page:** 20

---

## [Index type of UnitRange{BigInt} changed from Int to BigInt after Julia 1.8: regression?](https://discourse.julialang.org/t/index-type-of-unitrange-bigint-changed-from-int-to-bigint-after-julia-1-8-regression/92199)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [December 28, 2022, 2:15pm UTC](https://discourse.julialang.org/t/index-type-of-unitrange-bigint-changed-from-int-to-bigint-after-julia-1-8-regression/92199 "2022-12-28T14:15:39Z")

</div>

This expression returns Int on Julia 1.8, but BigInt beyond Julia 1.8: typeof(firstindex(map(BigInt, 1:1))) I think this might be a regression, but it seems like it could also have been done on purpose? This is arguab…

---

## [Checksum error in suitesparse](https://discourse.julialang.org/t/checksum-error-in-suitesparse/92219)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [December 28, 2022, 10:04am UTC](https://discourse.julialang.org/t/checksum-error-in-suitesparse/92219 "2022-12-28T10:04:06Z")

</div>

I’m trying to build Julia at commit 7ca1a9047a. It fails with the following error: =============================================================================== ERROR: sha512 checksum failure on SuiteSparse-ec4b40ad…

---

## [\`for i = 1:M, j = 1:N\` discrepancy (loop vs comprehension/generator)](https://discourse.julialang.org/t/for-i-1-m-j-1-n-discrepancy-loop-vs-comprehension-generator/75659)

<div class="topic-metadata">

**Author:** [@StevenWhitaker](https://discourse.julialang.org/u/StevenWhitaker)\
**Replies:** 26\
**Last updated:** [December 28, 2022, 2:24am UTC](https://discourse.julialang.org/t/for-i-1-m-j-1-n-discrepancy-loop-vs-comprehension-generator/75659 "2022-12-28T02:24:34Z")

</div>

I noticed the following about the for i = 1:M, j = 1:N syntax. When using this syntax as part of a normal for-loop, j iterates first: julia\> for i = 1:2, j = 1:3 println((i, j)) end (1, 1) (1, 2) (1, 3) (2…

---

## [Would it be possible to implement Jax-style reverse mode AD in Julia?](https://discourse.julialang.org/t/would-it-be-possible-to-implement-jax-style-reverse-mode-ad-in-julia/92065)

<div class="topic-metadata">

**Author:** [@benjamin-macadam](https://discourse.julialang.org/u/benjamin-macadam)\
**Replies:** 5\
**Last updated:** [December 24, 2022, 9:59pm UTC](https://discourse.julialang.org/t/would-it-be-possible-to-implement-jax-style-reverse-mode-ad-in-julia/92065 "2022-12-24T21:59:26Z")

</div>

I’ve spent a fair bit of time moving between Jax and Julia over the last year. One thing that has stuck out to me is that the AD libraries in Julia work in a fundamentally different way than Jax. As far as I can tell, th…

---

## [Experiment: NamedTuple Syntax w/ Type Declarations](https://discourse.julialang.org/t/experiment-namedtuple-syntax-w-type-declarations/91988)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 3\
**Last updated:** [December 22, 2022, 3:27am UTC](https://discourse.julialang.org/t/experiment-namedtuple-syntax-w-type-declarations/91988 "2022-12-22T03:27:57Z")

</div>

We have builtin syntax sugar for declaring NamedTuples like so: julia\> a, b, c, d = 1, 2, 3, 4 (1, 2, 3, 4) julia\> (; a=1, b=2, c, d) (a = 1, b = 2, c = 3, d = 4) However, if we wish to declare types (e.g. :a as Numbe…

---

## [Feature request: How about pattern matching of \`Base.Filesystem.readdir\`?](https://discourse.julialang.org/t/feature-request-how-about-pattern-matching-of-base-filesystem-readdir/91887)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 7\
**Last updated:** [December 20, 2022, 2:55pm UTC](https://discourse.julialang.org/t/feature-request-how-about-pattern-matching-of-base-filesystem-readdir/91887 "2022-12-20T14:55:44Z")

</div>

It’s Base.Filesystem.readdir in julia: https://docs.julialang.org/en/v1/base/file/#Base.Filesystem.readdir It’s readdir in R, it has exclude argument as regular expression: readdir(dir::AbstractString=pwd(); join…

---

## [Why am I wrong about GC?](https://discourse.julialang.org/t/why-am-i-wrong-about-gc/91452)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 4\
**Last updated:** [December 16, 2022, 5:10pm UTC](https://discourse.julialang.org/t/why-am-i-wrong-about-gc/91452 "2022-12-16T17:10:20Z")

</div>

To be clear at the top, I don’t have practical or theoretical background in language/compiler/memory management design. This is not a proposal for an improvement to Julia’s garbage collection. I have one of those “isn’t …

---

## [Why aren't expressions such as \`isinteger\` simplified in case that the result is inferrable from the arguments?](https://discourse.julialang.org/t/why-arent-expressions-such-as-isinteger-simplified-in-case-that-the-result-is-inferrable-from-the-arguments/91297)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 8\
**Last updated:** [December 11, 2022, 7:59pm UTC](https://discourse.julialang.org/t/why-arent-expressions-such-as-isinteger-simplified-in-case-that-the-result-is-inferrable-from-the-arguments/91297 "2022-12-11T19:59:48Z")

</div>

julia\> @code\_typed (n -\> isinteger(n+0.5))(2) CodeInfo( 1 ─ %1 = Base.sitofp(Float64, n)::Float64 │ %2 = Base.add\_float(%1, 0.5)::Float64 │ %3 = Base.trunc\_llvm(%2)::Float64 │ %4 = Base.sub\_float(%2, %3)::Float64 │…

---

## [Parser bug regarding parametric function expressions?](https://discourse.julialang.org/t/parser-bug-regarding-parametric-function-expressions/81848)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 2\
**Last updated:** [December 9, 2022, 6:07pm UTC](https://discourse.julialang.org/t/parser-bug-regarding-parametric-function-expressions/81848 "2022-12-09T18:07:57Z")

</div>

Some weird behavior here. Suppose we have this: SomeType = Tuple{Int8, Int16} f(::Type{Tuple{A, B}}) where {A \<: Any, B \<: Any} = B If we now do f(SomeType), we get Int16 in return as expected. The following however,…

---

## [New syntax for slicing](https://discourse.julialang.org/t/new-syntax-for-slicing/91241)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 14\
**Last updated:** [December 7, 2022, 6:30pm UTC](https://discourse.julialang.org/t/new-syntax-for-slicing/91241 "2022-12-07T18:30:26Z")

</div>

I’d like to suggest new syntax for eachslice, by overloading getindex (similar to how : behaves). Using / (which looks like a slice) would indicate a dimension to iterate over, i.e. array\[/, :\] == eachslice(array; dims=…

---

## [Default ndims method for any type that HasShape{N}?](https://discourse.julialang.org/t/default-ndims-method-for-any-type-that-hasshape-n/91271)

<div class="topic-metadata">

**Author:** [@nchisholm](https://discourse.julialang.org/u/nchisholm)\
**Replies:** 0\
**Last updated:** [December 5, 2022, 4:54pm UTC](https://discourse.julialang.org/t/default-ndims-method-for-any-type-that-hasshape-n/91271 "2022-12-05T16:54:39Z")

</div>

Currently, if one defines, for example, Base.IteratorSize(::MyMatrixLikeType) = Base.HasShape{2}(), one still needs to define Base.ndims(mymat::MyMatrixLikeType) = 2. Would it make sense to have a method for Base.ndims …

---

## [Is OffsetArrays.jl a poison pill?](https://discourse.julialang.org/t/is-offsetarrays-jl-a-poison-pill/85188)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 63\
**Last updated:** [December 5, 2022, 4:05am UTC](https://discourse.julialang.org/t/is-offsetarrays-jl-a-poison-pill/85188 "2022-12-05T04:05:50Z")

</div>

There have been recent discussions of issues related to OffsetArrays.jl. What I hope to contribute here is the perspective of an end-user (non-CS person), which was not the focus of the earlier threads. The need to acco…

---

## [Should \`reshape\` have an option for row-major order?](https://discourse.julialang.org/t/should-reshape-have-an-option-for-row-major-order/6929)

<div class="topic-metadata">

**Author:** [@tparker](https://discourse.julialang.org/u/tparker)\
**Replies:** 28\
**Last updated:** [December 4, 2022, 7:10pm UTC](https://discourse.julialang.org/t/should-reshape-have-an-option-for-row-major-order/6929 "2022-12-04T19:10:18Z")

</div>

Currently reshape can only rearrange the raw linearly ordered data into Julia’s default column-major order (or colexicographical order, for higher-dimensional arrays). Would it be worth adding an optional keyword argumen…

---

## [Invalidate precompilation cache](https://discourse.julialang.org/t/invalidate-precompilation-cache/90992)

<div class="topic-metadata">

**Author:** [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Replies:** 7\
**Last updated:** [December 2, 2022, 12:35pm UTC](https://discourse.julialang.org/t/invalidate-precompilation-cache/90992 "2022-12-02T12:35:59Z")

</div>

How can I invalidate the precompilation cache in a programmable way from within julia, to force precompilation upon restart ?

---

## [Use modern, secure, Windows API for dlopen](https://discourse.julialang.org/t/use-modern-secure-windows-api-for-dlopen/90171)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 5\
**Last updated:** [December 2, 2022, 4:48am UTC](https://discourse.julialang.org/t/use-modern-secure-windows-api-for-dlopen/90171 "2022-12-02T04:48:10Z")

</div>

Changing dlopen to use LOAD\_LIBRARY\_SEARCH\_DEFAULT\_DIRS rather than LOAD\_WITH\_ALTERED\_SEARCH\_PATH Currently, we use the windows “Alternate Search Order” to find DLLs. I propose that we use a new mechanism that is extensi…

---

## [Rounding dates API](https://discourse.julialang.org/t/rounding-dates-api/91120)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 3\
**Last updated:** [December 2, 2022, 1:16am UTC](https://discourse.julialang.org/t/rounding-dates-api/91120 "2022-12-02T01:16:59Z")

</div>

round(T, x) works like this julia\> round(Int16, float(pi)) 3 but for Dates it’s backwards: julia\> round(today(), Week) 2022-11-28 Why is this?

---

## [What is a GlobalRef and how I use it?](https://discourse.julialang.org/t/what-is-a-globalref-and-how-i-use-it/90971)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 4\
**Last updated:** [November 29, 2022, 12:56pm UTC](https://discourse.julialang.org/t/what-is-a-globalref-and-how-i-use-it/90971 "2022-11-29T12:56:07Z")

</div>

Motivation RecipesBase.jl defines a macro @recipe that adds new methods to the RecipesBase.apply\_recipe function. The catch is that RecipesBase might not be in scope at the macro call site, so the function RecipesBase.ap…

---

## [Fixing the Piping/Chaining/Partial Application Issue (Rev 2)](https://discourse.julialang.org/t/fixing-the-piping-chaining-partial-application-issue-rev-2/90408)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 40\
**Last updated:** [November 26, 2022, 3:15am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-partial-application-issue-rev-2/90408 "2022-11-26T03:15:25Z")

</div>

Starting this thread anew to avoid confusion, because I changed my mind on which approach I support partway through a long thread (sorry!). It’s also useful to distill some of the last thread’s learnings. Thank you to a…

---

## [Purely functional modules](https://discourse.julialang.org/t/purely-functional-modules/89681)

<div class="topic-metadata">

**Author:** [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Replies:** 20\
**Last updated:** [November 24, 2022, 6:10am UTC](https://discourse.julialang.org/t/purely-functional-modules/89681 "2022-11-24T06:10:47Z")

</div>

It seems to me in the data science field some types of modules can be written without modifying any shared state. What if there is a type of module called fmodule that not only cannot modify shared state, but doesn’t al…

---

## [Change the precedence of “/” to something between “addition” and “syntax”?](https://discourse.julialang.org/t/change-the-precedence-of-to-something-between-addition-and-syntax/90542)

<div class="topic-metadata">

**Author:** [@GrimPixel](https://discourse.julialang.org/u/GrimPixel)\
**Replies:** 14\
**Last updated:** [November 21, 2022, 10:19pm UTC](https://discourse.julialang.org/t/change-the-precedence-of-to-something-between-addition-and-syntax/90542 "2022-11-21T22:19:15Z")

</div>

I see, the convenience of maths expressions is important in Julia. The problem with current precedence of “/” is, it is often considered as the fractional slash and people use it only once in a fraction, e.g. “1/(2\*3\*4)” …

---

## [Partial Application brackets without underscores](https://discourse.julialang.org/t/partial-application-brackets-without-underscores/90565)

<div class="topic-metadata">

**Author:** [@christophE](https://discourse.julialang.org/u/christophE)\
**Replies:** 5\
**Last updated:** [November 21, 2022, 12:01pm UTC](https://discourse.julialang.org/t/partial-application-brackets-without-underscores/90565 "2022-11-21T12:01:14Z")

</div>

After years I understand the idea behind the proposal of PR 24990. It wants to bring partial application (or currying) to Julia which is much overdue. I thought previously, \_ is merely a crutch to be eventually used for…

---

## [Multiple modules in compilecache file?](https://discourse.julialang.org/t/multiple-modules-in-compilecache-file/90406)

<div class="topic-metadata">

**Author:** [@green.nsk](https://discourse.julialang.org/u/green.nsk)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 3:21pm UTC](https://discourse.julialang.org/t/multiple-modules-in-compilecache-file/90406 "2022-11-17T15:21:52Z")

</div>

I was down a rabbithole trying to understand why I am getting multiple versions of a single package loaded in my application. And I think I narrowed it down to the fact that one of precompile cache files contains two “mo…

---

## [Criteria for including of functionality in \`Base\`](https://discourse.julialang.org/t/criteria-for-including-of-functionality-in-base/90151)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 6\
**Last updated:** [November 13, 2022, 11:13pm UTC](https://discourse.julialang.org/t/criteria-for-including-of-functionality-in-base/90151 "2022-11-13T23:13:58Z")

</div>

When is a construct that is not required by the compiler or Pkg included in Base? What criteria are used to decide if a PR adding such functionality should be merged? Are these criteria documented? For example, I’m thin…

---

## [Why did the \`source\` button in Julia docs disappear?](https://discourse.julialang.org/t/why-did-the-source-button-in-julia-docs-disappear/90205)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 1\
**Last updated:** [November 13, 2022, 8:47pm UTC](https://discourse.julialang.org/t/why-did-the-source-button-in-julia-docs-disappear/90205 "2022-11-13T20:47:36Z")

</div>

Sometimes I wish to see how exactly a function in Base is implemented, e.g. the 3 argument dot function. But the documentation doesn’t have the blue source button that links me directly to the code on Github https://do…

---

## [Julia 1.9 feature freeze: October 10, 2022](https://discourse.julialang.org/t/julia-1-9-feature-freeze-october-10-2022/87606)

<div class="topic-metadata">

**Author:** [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Replies:** 8\
**Last updated:** [November 12, 2022, 4:42am UTC](https://discourse.julialang.org/t/julia-1-9-feature-freeze-october-10-2022/87606 "2022-11-12T04:42:40Z")

</div>

We’ve set the feature freeze for Julia 1.9 to Monday, October 10, 2022. If there are any feature PRs you’d like to get into Julia 1.9, they’ll need to be merged prior to that date.

---

## [Software Memory Safety](https://discourse.julialang.org/t/software-memory-safety/90132)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 1\
**Last updated:** [November 11, 2022, 9:40pm UTC](https://discourse.julialang.org/t/software-memory-safety/90132 "2022-11-11T21:40:26Z")

</div>

“The National Security Agency (NSA) published guidance today to help software developers and operators prevent and mitigate software memory safety issues, which account for a large portion of exploitable vulnerabilities.…

---

## [Where is \`isa\` defined](https://discourse.julialang.org/t/where-is-isa-defined/90015)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 5\
**Last updated:** [November 10, 2022, 7:24am UTC](https://discourse.julialang.org/t/where-is-isa-defined/90015 "2022-11-10T07:24:20Z")

</div>

julia\> @less 1 isa Int ERROR: could not determine location of method definition How else can I locate the method definition? Grepping for isa is tricky.

---

## [Why begin/end instead of { } for block delimiter](https://discourse.julialang.org/t/why-begin-end-instead-of-for-block-delimiter/89735)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 27\
**Last updated:** [November 8, 2022, 4:58pm UTC](https://discourse.julialang.org/t/why-begin-end-instead-of-for-block-delimiter/89735 "2022-11-08T16:58:04Z")

</div>

Why does Julia use begin/end as the block delimiter instead of the more common and concise { }? Why is that better?

---

## [What are Julia's coordinates in the λ-cube?](https://discourse.julialang.org/t/what-are-julias-coordinates-in-the-cube/89883)

<div class="topic-metadata">

**Author:** [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Replies:** 6\
**Last updated:** [November 7, 2022, 4:51pm UTC](https://discourse.julialang.org/t/what-are-julias-coordinates-in-the-cube/89883 "2022-11-07T16:51:51Z")

</div>

I was sidetracked procrastinating reading a thread about using “{}”. here and popping out a new thread. My vote was to make where statements more expressive by doing type calculations inside blocks deliminated by {} so …

---

## [How to warn new users away from metaprogramming](https://discourse.julialang.org/t/how-to-warn-new-users-away-from-metaprogramming/35022)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 27\
**Last updated:** [November 6, 2022, 2:17pm UTC](https://discourse.julialang.org/t/how-to-warn-new-users-away-from-metaprogramming/35022 "2022-11-06T14:17:56Z")

</div>

Metaprogramming is a great feature of Julia, allowing advanced users to introduce syntactic extensions with macros, and work around code optimization problems using generated functions. However, it is somewhat of an adva…

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

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