# Language Design

**URL:** https://forum.modular.com/c/mojo/language-design/20.md

[Latest](https://forum.modular.com/latest.md) · [Categories](https://forum.modular.com/categories.md) · [Tags](https://forum.modular.com/tags.md)

---

## [About the Language Design category](https://forum.modular.com/t/about-the-language-design-category/766)

<div class="topic-metadata">

**Author:** [@Caroline](https://forum.modular.com/u/Caroline)\
**Replies:** 0

</div>

---

## [Pattern matching + Enum proposals](https://forum.modular.com/t/pattern-matching-enum-proposals/3473)

<div class="topic-metadata">

**Author:** [@owenhilyard](https://forum.modular.com/u/owenhilyard)\
**Replies:** 68\
**Last updated:** [October 28, 2026, 7:08am UTC](https://forum.modular.com/t/pattern-matching-enum-proposals/3473 "2026-10-28T07:08:56Z")

</div>

cc @clattner as author

---

## [Companion Proposal: Inductive Enums and Structural Recursion](https://forum.modular.com/t/companion-proposal-inductive-enums-and-structural-recursion/3570)

<div class="topic-metadata">

**Author:** [@anatolvitold](https://forum.modular.com/u/anatolvitold)\
**Replies:** 13\
**Last updated:** [October 19, 2026, 9:32pm UTC](https://forum.modular.com/t/companion-proposal-inductive-enums-and-structural-recursion/3570 "2026-10-19T21:32:56Z")

</div>

Companion Proposal: Inductive Enums and Structural Recursion The enum and pattern-matching proposals lay solid groundwork. I’d like to extend the discussion to recursive data and checked, stack-safe traversal, particular…

---

## [Asynchronous Programming in Mojo](https://forum.modular.com/t/asynchronous-programming-in-mojo/3544)

<div class="topic-metadata">

**Author:** [@Steffi](https://forum.modular.com/u/Steffi)\
**Replies:** 26\
**Last updated:** [October 15, 2026, 3:58pm UTC](https://forum.modular.com/t/asynchronous-programming-in-mojo/3544 "2026-10-15T15:58:44Z")

</div>

The Mojo team is resuming work on asynchronous programming in Mojo. The proposal can be found modular/Mojo/proposals/async-design.md at main · modular/modular · GitHub . Please comment on the proposal in this forum. Ov…

---

## [Proposal: \`iota\`, an Auto-Incrementing Counter for \`comptime\` Struct Members](https://forum.modular.com/t/proposal-iota-an-auto-incrementing-counter-for-comptime-struct-members/3528)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 4\
**Last updated:** [September 30, 2026, 5:19am UTC](https://forum.modular.com/t/proposal-iota-an-auto-incrementing-counter-for-comptime-struct-members/3528 "2026-09-30T05:19:02Z")

</div>

Proposal: iota, an Auto-Incrementing Counter for comptime Struct Members Summary Add iota as a built-in compile-time Int for struct comptime declarations. Inside a constructor expression T(...), iota evaluates to the pre…

---

## [Discussion: Is the ^ Transfer Sigil Visible Enough?](https://forum.modular.com/t/discussion-is-the-transfer-sigil-visible-enough/3513)

<div class="topic-metadata">

**Author:** [@kkbj](https://forum.modular.com/u/kkbj)\
**Replies:** 3\
**Last updated:** [September 21, 2026, 8:52am UTC](https://forum.modular.com/t/discussion-is-the-transfer-sigil-visible-enough/3513 "2026-09-21T08:52:26Z")

</div>

hello, I’d like to discuss the readability of Mojo’s ^ transfer sigil. The \[official ownership documentation\] explains that when a function takes a var argument, the caller can explicitly transfer ownership by adding ^ …

---

## [Should mojo at some point require a seperate toolchain for nightly features?](https://forum.modular.com/t/should-mojo-at-some-point-require-a-seperate-toolchain-for-nightly-features/3507)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 0\
**Last updated:** [September 18, 2026, 6:37am UTC](https://forum.modular.com/t/should-mojo-at-some-point-require-a-seperate-toolchain-for-nightly-features/3507 "2026-09-18T06:37:13Z")

</div>

I think that is worth considering. The main advantage is, that it allows new nightly features without thinking and thus enables more experimentation. Of course that would come at the cost of complicated packaging. But …

---

## [\[Feature Request\] Overflow and Saturating Arithmetic](https://forum.modular.com/t/feature-request-overflow-and-saturating-arithmetic/3496)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 3\
**Last updated:** [September 15, 2026, 1:03pm UTC](https://forum.modular.com/t/feature-request-overflow-and-saturating-arithmetic/3496 "2026-09-15T13:03:21Z")

</div>

Multi-precision integer arithmetic (BigInt, cryptographic field arithmetic) cannot be implemented efficiently without carry/borrow propagation and double-word multiplication primitives. Without them, compilers are forced…

---

## [Initializer lists \`{}\` out of place?](https://forum.modular.com/t/initializer-lists-out-of-place/3489)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 7\
**Last updated:** [September 14, 2026, 10:40am UTC](https://forum.modular.com/t/initializer-lists-out-of-place/3489 "2026-09-14T10:40:35Z")

</div>

They are now equivalent to .\_init\_(). To make this more ergonomic, a built-in new or init function could be added. I don’t like the current initalizer lists, since they are harder to distinguish as function calls.

---

## [Merging errors during cleanup failures](https://forum.modular.com/t/merging-errors-during-cleanup-failures/3397)

<div class="topic-metadata">

**Author:** [@DenisNavarro](https://forum.modular.com/u/DenisNavarro)\
**Replies:** 10\
**Last updated:** [August 16, 2026, 8:39pm UTC](https://forum.modular.com/t/merging-errors-during-cleanup-failures/3397 "2026-08-16T20:39:45Z")

</div>

Hello. Thanks for your work on the Mojo language. Right now, Mojo does not merge exceptions by default when multiple exceptions are raised, especially during cleanup failures. May it change in a future version of Mojo? …

---

## [Proposal: Introduce implicit raises for Optional Error Handling](https://forum.modular.com/t/proposal-introduce-implicit-raises-for-optional-error-handling/2551)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 3\
**Last updated:** [August 14, 2026, 4:11am UTC](https://forum.modular.com/t/proposal-introduce-implicit-raises-for-optional-error-handling/2551 "2026-08-14T04:11:54Z")

</div>

Proposal: Introduce implicit raises for Optional Error Handling Summary I propose adding the syntax implicit raises Type. This allows functions to declare exceptions that are optional to handle. If the caller does not h…

---

## [MLIR Dialect Import for Mojo](https://forum.modular.com/t/mlir-dialect-import-for-mojo/774)

<div class="topic-metadata">

**Author:** [@owenhilyard](https://forum.modular.com/u/owenhilyard)\
**Replies:** 3\
**Last updated:** [July 21, 2026, 8:58am UTC](https://forum.modular.com/t/mlir-dialect-import-for-mojo/774 "2026-07-21T08:58:58Z")

</div>

Are there plans for out of tree dialects to be supported in Mojo? Interesting MLIR-based compilers for specific hardware, like TT-MLIR, are starting to pop up. That one in particular should only require turning on the RI…

---

## [Rename \`read\` argument convention and \`Immut\` type prefix?](https://forum.modular.com/t/rename-read-argument-convention-and-immut-type-prefix/2449)

<div class="topic-metadata">

**Author:** [@christoph\_schlumpf](https://forum.modular.com/u/christoph_schlumpf)\
**Replies:** 83\
**Last updated:** [July 16, 2026, 8:19am UTC](https://forum.modular.com/t/rename-read-argument-convention-and-immut-type-prefix/2449 "2026-07-16T08:19:54Z")

</div>

Hello Mojicians, I propose to rename the read argument convention to immut. This is inspired by recent activities to rename and clean up some naming before “Phase 1” of the Mojo roadmap is finished like Mojo change: re…

---

## [Reasoning behind immutable parameters to functions versus mutable by default var bindings?](https://forum.modular.com/t/reasoning-behind-immutable-parameters-to-functions-versus-mutable-by-default-var-bindings/3130)

<div class="topic-metadata">

**Author:** [@sashang](https://forum.modular.com/u/sashang)\
**Replies:** 2\
**Last updated:** [June 1, 2026, 4:41pm UTC](https://forum.modular.com/t/reasoning-behind-immutable-parameters-to-functions-versus-mutable-by-default-var-bindings/3130 "2026-06-01T16:41:15Z")

</div>

Hi Just wondering what the reasoning was behind making var bindings mutable, like variables in C, and parameters of functions immutable? Thanks

---

## [Formal proposal for closures](https://forum.modular.com/t/formal-proposal-for-closures/2989)

<div class="topic-metadata">

**Author:** [@monte](https://forum.modular.com/u/monte)\
**Replies:** 2\
**Last updated:** [May 24, 2026, 5:23pm UTC](https://forum.modular.com/t/formal-proposal-for-closures/2989 "2026-05-24T17:23:26Z")

</div>

Good day, everyone. I trust all is well. I would like to ask if we could get a formal proposal drawn up for closures. It seems that there is currently no formal proposal for closures. Please also note the following f…

---

## [Which Mojo keywords can be used as package names without escaping?](https://forum.modular.com/t/which-mojo-keywords-can-be-used-as-package-names-without-escaping/3088)

<div class="topic-metadata">

**Author:** [@jbemmel](https://forum.modular.com/u/jbemmel)\
**Replies:** 1\
**Last updated:** [May 16, 2026, 7:39pm UTC](https://forum.modular.com/t/which-mojo-keywords-can-be-used-as-package-names-without-escaping/3088 "2026-05-16T19:39:43Z")

</div>

I was trying to understand how Mojo treats package path segments that overlap with language keywords, especially for generated code where package names may come from an external schema. I wrote a small standalone prob…

---

## [\[Feature Request/Discussion\] Minimum Viable Existentials for 1.0](https://forum.modular.com/t/feature-request-discussion-minimum-viable-existentials-for-1-0/3086)

<div class="topic-metadata">

**Author:** [@owenhilyard](https://forum.modular.com/u/owenhilyard)\
**Replies:** 3\
**Last updated:** [May 16, 2026, 3:17pm UTC](https://forum.modular.com/t/feature-request-discussion-minimum-viable-existentials-for-1-0/3086 "2026-05-16T15:17:09Z")

</div>

One thing I have repeatedly run into is that Mojo’s capabilities for abstraction at runtime feel inferior to Mojo’s compile-time abstraction capabilties. While this is often fine for hot loops and fixable with the JIT co…

---

## [Comptime read\_file("schema.json")](https://forum.modular.com/t/comptime-read-file-schema-json/3018)

<div class="topic-metadata">

**Author:** [@jbemmel](https://forum.modular.com/u/jbemmel)\
**Replies:** 3\
**Last updated:** [May 2, 2026, 5:50pm UTC](https://forum.modular.com/t/comptime-read-file-schema-json/3018 "2026-05-02T17:50:41Z")

</div>

If there was one compile-time feature I’d love in Mojo, it’s the ability to bring in external data for codegen. I realize something like comptime fetch(url) is a non-starter (non-determinism, security, etc.), but it rai…

---

## [Variant projection of common shared members or traits](https://forum.modular.com/t/variant-projection-of-common-shared-members-or-traits/3019)

<div class="topic-metadata">

**Author:** [@jbemmel](https://forum.modular.com/u/jbemmel)\
**Replies:** 0\
**Last updated:** [May 2, 2026, 5:36pm UTC](https://forum.modular.com/t/variant-projection-of-common-shared-members-or-traits/3019 "2026-05-02T17:36:53Z")

</div>

In the context of building a compiler AST I have structs that are very similar, representing different constructs: struct Identifier(CommonTrait): var text: String struct Expression(CommonTrait): var text: String…

---

## [\[proposal\] Make UnsafePointer Non-nullable](https://forum.modular.com/t/proposal-make-unsafepointer-non-nullable/2968)

<div class="topic-metadata">

**Author:** [@owenhilyard](https://forum.modular.com/u/owenhilyard)\
**Replies:** 3\
**Last updated:** [April 14, 2026, 6:36pm UTC](https://forum.modular.com/t/proposal-make-unsafepointer-non-nullable/2968 "2026-04-14T18:36:18Z")

</div>

Proposal from @nate

---

## [\[Informal Proposal\] Portable SIMT for Mojo](https://forum.modular.com/t/informal-proposal-portable-simt-for-mojo/2953)

<div class="topic-metadata">

**Author:** [@owenhilyard](https://forum.modular.com/u/owenhilyard)\
**Replies:** 4\
**Last updated:** [April 12, 2026, 1:52pm UTC](https://forum.modular.com/t/informal-proposal-portable-simt-for-mojo/2953 "2026-04-12T13:52:06Z")

</div>

I’ve been thinking a bit about SIMT and a problem we have in Mojo, namely that we have “GPU functions” and “CPU functions”, where code won’t work correctly on CPU with no real indication of why unless you know it’s suppo…

---

## [Adding a static / comptime Optional to the stdlib](https://forum.modular.com/t/adding-a-static-comptime-optional-to-the-stdlib/1414)

<div class="topic-metadata">

**Author:** [@samufi](https://forum.modular.com/u/samufi)\
**Replies:** 9\
**Last updated:** [February 10, 2026, 8:12am UTC](https://forum.modular.com/t/adding-a-static-comptime-optional-to-the-stdlib/1414 "2026-02-10T08:12:57Z")

</div>

Optional is a great way to achieve dynamism at runtime. However, often the existence of attributes/arguments can be already inferred at comptime. Consider a function that takes an optional argument, which is only proces…

---

## [Idea: comptime var](https://forum.modular.com/t/idea-comptime-var/2668)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 3\
**Last updated:** [February 3, 2026, 12:29am UTC](https://forum.modular.com/t/idea-comptime-var/2668 "2026-02-03T00:29:41Z")

</div>

Proposal: Compile-Time Mutable Variables (comptime var) Summary Introduce comptime var to allow mutable state during the compilation phase. This feature, inspired by Zig, enables advanced metaprogramming patterns—such a…

---

## [Python's dataclass-like behavior for \`@fieldwise\_init\`](https://forum.modular.com/t/pythons-dataclass-like-behavior-for-fieldwise-init/2674)

<div class="topic-metadata">

**Author:** [@martinvuyk](https://forum.modular.com/u/martinvuyk)\
**Replies:** 0\
**Last updated:** [February 2, 2026, 7:11pm UTC](https://forum.modular.com/t/pythons-dataclass-like-behavior-for-fieldwise-init/2674 "2026-02-02T19:11:25Z")

</div>

Ideally we’d be able to do something like this at some point: @fieldwise\_init struct MyComplex: var re: Int var im: Int = 0 @fieldwise\_init struct MyComplexList: comptime \_L = List\[MyComplex\] var elems:…

---

## [@stable decorator](https://forum.modular.com/t/stable-decorator/2624)

<div class="topic-metadata">

**Author:** [@denis](https://forum.modular.com/u/denis)\
**Replies:** 11\
**Last updated:** [January 30, 2026, 1:05am UTC](https://forum.modular.com/t/stable-decorator/2624 "2026-01-30T01:05:18Z")

</div>

I added a proposal for @stable decorator in Mojo. This is something we want to implement soon-ish, so that the standard library can adopt it. Please share your thoughts and opinions. In particular: 3p packages. We’re…

---

## [A more powerful \`@parameter for\`](https://forum.modular.com/t/a-more-powerful-parameter-for/2612)

<div class="topic-metadata">

**Author:** [@owenhilyard](https://forum.modular.com/u/owenhilyard)\
**Replies:** 11\
**Last updated:** [January 21, 2026, 10:21pm UTC](https://forum.modular.com/t/a-more-powerful-parameter-for/2612 "2026-01-21T22:21:05Z")

</div>

As seen in https://github.com/modular/modular/issues/5787, some of the behavior around as used for performance reasons is starting to clash with Mojo’s goal of good compile times. I think that this signals that there may…

---

## [Unions vs sum types](https://forum.modular.com/t/unions-vs-sum-types/2482)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 28\
**Last updated:** [December 29, 2025, 12:48am UTC](https://forum.modular.com/t/unions-vs-sum-types/2482 "2025-12-29T00:48:09Z")

</div>

Continung discussion: @owenhilyard Unions and sum types are separate concepts. A sum type is checked, which is why we expect there to be control flow involved in accessing it, whereas a union is an unsafe construct w…

---

## [Proposal: Decoupling Int Width from Pointer Size](https://forum.modular.com/t/proposal-decoupling-int-width-from-pointer-size/2558)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 0\
**Last updated:** [December 28, 2025, 4:32pm UTC](https://forum.modular.com/t/proposal-decoupling-int-width-from-pointer-size/2558 "2025-12-28T16:32:12Z")

</div>

Proposal: Decoupling Int Width from Pointer Size Summary: Define Int as a platform-dependent type with a guaranteed minimum width of 64 bits, distinct from the system’s pointer width. Motivation Default Robustness: As …

---

## [Proposal: Make integer overflow a logic error](https://forum.modular.com/t/proposal-make-integer-overflow-a-logic-error/2529)

<div class="topic-metadata">

**Author:** [@leb-kuchen](https://forum.modular.com/u/leb-kuchen)\
**Replies:** 20\
**Last updated:** [December 25, 2025, 7:40pm UTC](https://forum.modular.com/t/proposal-make-integer-overflow-a-logic-error/2529 "2025-12-25T19:40:42Z")

</div>

In debug mode overflow would trap/unwind. In release mode: The default would be wrapping, but overflow checks could be enabled with the flag -f overflow-checks. This would be similar to Rust’s model. See Profiles - Th…

---

## [Reviewing the Iterator/Iterable Abstraction](https://forum.modular.com/t/reviewing-the-iterator-iterable-abstraction/2288)

<div class="topic-metadata">

**Author:** [@owenhilyard](https://forum.modular.com/u/owenhilyard)\
**Replies:** 44\
**Last updated:** [December 23, 2025, 9:09pm UTC](https://forum.modular.com/t/reviewing-the-iterator-iterable-abstraction/2288 "2025-12-23T21:09:14Z")

</div>

With the recent work on Iterators in the stdlib, I think it’s a good idea to have another discussion on Mojo’s iterator API. Explicitly not in Scope Things which are out of scope for this discussion. The inability to …

[Next page](https://forum.modular.com/c/mojo/language-design/20.md?page=1)
