'''Odin''' is an [[imperative programming|imperative]], [[General-purpose programming language|general-purpose]], [[compiled programming language|compiled]] and [[statically typed]] [[system programming language]] designed by [[Ginger Bill|Ginger Bill.]]<ref>{{cite web | url=https://www.youtube.com/watch?v=2YLA4ajby00 | title=Interview with Odin language creator gingerBill | website=[[YouTube]] }}</ref><ref>{{Cite web |date=2023-01-06 |title=Learn to Code with Odin Programming Language - Introduction |url=https://dev.to/patrickodacre/learn-to-code-with-odin-programming-language-introduction-ga5 |access-date=2023-11-27 |website=DEV Community |language=en}}</ref><ref>{{Cite web |title=Odin: Language |url=https://eluchn.hashnode.dev/odin-language |access-date=2023-11-27 |website=Software Engineering |language=en}}</ref>
TheOdin languageis supports:designed [[compile-time]]to [[parametricbe polymorphism]],an [[Typealternative introspection|runtimeto reflection]],the [[cross-compilation]], [[manual memory management]], [[arrayC_(programming_language)|C programming]], and [[AoS_and_SoA|SOAlanguage]] data types.<ref>{{cite web |title=Introducing Odin Lang (Japanese) |url=https://www.youtubeqiita.com/watch?v=iCqW_RepcW0sh1so6/items/40bdda93d6fa2f094fd7 | titleaccess-date=Overloading and/Or (Multi) Methods in Julia, C, Odin, Nim, C#, & TypeScript2019-09-29 | website=[[YouTube]] Qiita}}</ref><ref>{{Cite web |date=2022-11-04 |title=OverviewProgramming Games by Hand Using Odin |url=https://odin-langcommunity.codenewbie.org/docs/overviewpatrickodacre/programming-games-by-hand-using-odin-55lh |access-date=20222023-1011-2027 |website=CodeNewbie Community 🌱 |language=en}}</ref> and achieve "high performance" on "modern systems"<ref>https://odin-lang.org/</ref><ref>{{cite web |title=Comparisons with other languages - C3 Documentation |url=https://www.c3-lang.org/compare/#odin}}</ref>, with features like compile-time [[parametric polymorphism]], [[array programming]], and [[Type_introspection|runtime reflection]].<ref name=":0">{{cite web |title=Odin programming language review |url=https://graphitemaster.github.io/odin_review/#quality-of-life | title=Odin programming language review }}</ref><ref>{{citeCite web |title=Writing an Operating System in Odin |url=https://mediumflysand7.comhashnode.dev/swlh/somethingwriting-isan-happeningos-tokernel-ourin-programmingodin |access-languagesdate=2023-and11-i-like-it-a66447beade27 | titlewebsite=Somethingflysand7's is Happening to Our Programming Languages, and I like Itblog | datelanguage=31 May 2020 en}}</ref>
== ExampleSyntax and features ==
Odin's syntax is similar to that of Go and Jai.<ref>{{Cite web |date=2022-09-21 |title=Low-Level Programming with Odin Lang - Perfect for Beginners |url=https://dev.to/patrickodacre/low-level-programming-with-odin-lang-perfect-for-beginners-5cc3 |access-date=2023-11-27 |website=DEV Community |language=en}}</ref><ref>{{Citation |title=Jai vs Odin systems programming languages (Non-spicy takes!) |url=https://www.youtube.com/watch?v=M763xHjsPk4 |access-date=2023-11-27 |language=en}}</ref> The following is a simple example program written in Odin:<syntaxhighlight lang="go">
<syntaxhighlight lang="go">
package main
program, accumulator)
}
</syntaxhighlight>
== Design ==
Odin is designed to be an alternative for the [[C_(programming_language)|C programming language]]<ref>{{cite web |title=Introducing Odin Lang (Japanese) |url=https://qiita.com/sh1so6/items/40bdda93d6fa2f094fd7 |website=Qiita |access-date=2019-09-29}}</ref><ref>{{Cite web |date=2022-11-04 |title=Programming Games by Hand Using Odin |url=https://community.codenewbie.org/patrickodacre/programming-games-by-hand-using-odin-55lh |access-date=2023-11-27 |website=CodeNewbie Community 🌱 |language=en}}</ref> to achieve "high performance" on "modern systems"<ref>https://odin-lang.org/</ref><ref>{{cite web | url=https://www.c3-lang.org/compare/#odin | title=Comparisons with other languages - C3 Documentation }}</ref>, with features like compile-time [[parametric polymorphism]], [[array programming]], and [[Type_introspection|runtime reflection]].<ref name=":0" /><ref>{{Cite web |title=Writing an Operating System in Odin |url=https://flysand7.hashnode.dev/writing-an-os-kernel-in-odin |access-date=2023-11-27 |website=flysand7's blog |language=en}}</ref>
=== Syntax ===
Odin's declaration syntax is inspired by Newsqueak and Jai.
<syntaxhighlight lang="go">
// Variable declarations
x : int = 123
x := 123 // Type inference
// Constant value declarations
X :: 123
Y : int : 123
// Function declaration
Z :: proc() {}
</syntaxhighlight>
|