Skip to content
Tech News
← Back to articles

Everyone says assembly is untyped—everyone is wrong

read original more articles
Why This Matters

This article highlights Odin's innovative approach to inline assembly, emphasizing its fully typed, integrated, and cross-ISA design, which sets it apart from traditional assembly implementations in other languages. This advancement enhances code safety, readability, and debugging capabilities, offering significant benefits for both developers and the broader tech industry. It demonstrates how thoughtful language design can elevate low-level programming to new levels of integration and reliability.

Key Takeaways

Everyone Says Assembly Is Untyped—Everyone Is Wrong Series: Syntax and how it Matters

TL;DR: I believe Odin’s inline assembly is currently the best out of any language.

The most important aspects are of this article listed below. I am not aware of any other assembly (GCC/Clang/Rust/Go…) that would combine all of these aspects:

Inline assembly is organized into asm “templates”, similar to and callable as procedures.

“templates”, similar to and callable as procedures. asm templates integrate with rest of the code, through bindings specifying clobbers, pinned, tied, and scratch registers.

templates integrate with rest of the code, through bindings specifying clobbers, pinned, tied, and scratch registers. Assembly syntax is unified across ISAs and consistent with Odin syntax.

Assembly is fully type checked, just like rest of Odin code.

Understanding that assembly is actually typed.

Real semantic diagnostics via core:rexcode encoding tables.

encoding tables. It was built in ~7 days.

... continue reading