# \#lowering

**URL:** https://discourse.julialang.org/tag/lowering/1685.md

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

---

## [Where is the lowering of end within \[ \] documented](https://discourse.julialang.org/t/where-is-the-lowering-of-end-within-documented/136736)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [April 18, 2026, 9:23am UTC](https://discourse.julialang.org/t/where-is-the-lowering-of-end-within-documented/136736 "2026-04-18T09:23:33Z")

</div>

Where is the lowering of end within \[\] documented? Ie the fact that it is assigned a value from lastindex, as in julia\> Meta.@lower (1:4)\[min(end, 5)\] :($(Expr(:thunk, CodeInfo( 1 ─ %1 = Main.:(:) │ %2 = dynamic (%1…

---

## [Multi-dimensional indices are incompatible with \`end\` index](https://discourse.julialang.org/t/multi-dimensional-indices-are-incompatible-with-end-index/134886)

<div class="topic-metadata">

**Author:** [@aryavorskiy](https://discourse.julialang.org/u/aryavorskiy)\
**Replies:** 1\
**Last updated:** [January 5, 2026, 2:14pm UTC](https://discourse.julialang.org/t/multi-dimensional-indices-are-incompatible-with-end-index/134886 "2026-01-05T14:14:41Z")

</div>

Julia allows to access the last index in the axis of an array using the end keyword by lowering it to lastindex in a rather predictable way: A = rand(5, 5, 2) A\[1:end - 1, end ÷ 2, :\] # lowers to A\[1:lastindex(A, 1) - 1…

---

## [Val{N} + LinearIndices Causes Massive Compile-Time Unrolling](https://discourse.julialang.org/t/val-n-linearindices-causes-massive-compile-time-unrolling/128248)

<div class="topic-metadata">

**Author:** [@0samuraiE](https://discourse.julialang.org/u/0samuraiE)\
**Replies:** 2\
**Last updated:** [April 20, 2025, 2:47pm UTC](https://discourse.julialang.org/t/val-n-linearindices-causes-massive-compile-time-unrolling/128248 "2025-04-20T14:47:46Z")

</div>

I’m seeing strange behavior when using @code\_warntype on a function that takes a Val{N} parameter and creates a LinearIndices object with size (N, N, N). Here’s a minimal example: function test(::Val{N}) where {N} L…

---

## [How to implement custom assignment with \`:=\` ? (for tinkering/learning purposes)](https://discourse.julialang.org/t/how-to-implement-custom-assignment-with-for-tinkering-learning-purposes/121467)

<div class="topic-metadata">

**Author:** [@Sevi](https://discourse.julialang.org/u/Sevi)\
**Replies:** 6\
**Last updated:** [October 21, 2024, 7:37am UTC](https://discourse.julialang.org/t/how-to-implement-custom-assignment-with-for-tinkering-learning-purposes/121467 "2024-10-21T07:37:35Z")

</div>

I stumbled across this post and realized I have no idea how I would actually implement := to mean something like “define/assign the variable if it is not already defined, otherwise throw an error”, so I’m looking for som…
