I just started “Build Your Own Text Editor”[0], but using Odin instead of C. So far, I’m impressed with Odin. It’s the most ergonomic C replacement I’ve tried. I wish it had been around 25 years ago when I was professionally working with unmanaged code.<p>[0] <a href="https://viewsourcecode.org/snaptoken/kilo/index.html" rel="nofollow">https://viewsourcecode.org/snaptoken/kilo/index.html</a>
I love Odin, and I'm glad to see it getting more attention. I've been working through Dave Churchill's COMP 4300 course[0] in Odin/Raylib rather than C++/SFML, and it's been a blast.<p>[0] <a href="https://www.youtube.com/playlist?list=PL_xRyXins84_Sq7yZkxGP_MgYAH-Zo8Uu" rel="nofollow">https://www.youtube.com/playlist?list=PL_xRyXins84_Sq7yZkxGP...</a>
Flipped through the language overview on the website and noticed that matrices are limited in how large they can be because they're stack allocated [1]. Ergonomics of the language otherwise look solid but for my use case that would be fairly constraining<p>[1] <a href="https://odin-lang.org/docs/overview/#technical-information-of-matrix-types" rel="nofollow">https://odin-lang.org/docs/overview/#technical-information-o...</a>
This looks really nice and the prose had a positive/easy-going feel to it.<p>When the actual code examples begin, the very first couple of lines confused me:<p><pre><code> package hellope
import "core:fmt"
</code></pre>
Is the quoting of package names optional?
Any reading recommendations for introduction to the fundamentals of manual memory management specifically? I tried learning C in the past but didn’t get very far without a compelling <i>need</i> to learn it.<p>I’ve toyed with Odin a bit and the language in syntax is right up my alley, but the idea of manually managing memory is pretty foreign to me. I understand it broadly, but have no good idea about how to actually do it practically and properly.<p>I will give this book a look as well since I see it covers the topic in some chapters.
I'm not particularly impressed by Odin but maybe i'm not the audience. If you like strictly procedural languages (or a die hard C fan) it's probably fine but it feels like a 'My First Language™' kind of project.<p>What I really miss are methods on structs a'la Go. Just simple receivers would be a great addition imho. Because of this choice, it's affected the entire stdlib and boy does it look old. Creating a typed variable to pass it to a stdlib init function (for allocation, etc) is terrible decision and it's everywhere. The stdlib looks muddled too.<p>Odin is obviously heavily inspired by Go (among others) but it's learned nothing of the lessons of the Go authors. For example, Odin is a larger language and has fewer features.<p>I got an ICE while compiling once and it reported something like `TODO(bill) support this`. Not a good look.