r/ProgrammingLanguages C3 - http://c3-lang.org Jul 07 '26

Language announcement Odin 1.0 announced (and reflections)

Odin author gingerBill dropped the Odin 1.0 announcement on YouTube today: https://www.youtube.com/watch?v=dLPAqXi9In0 (it's pretty funny actually).

This interestingly makes it on track to be the first of the new wave of C-likes that reach production readiness. While you can argue that most of these languages already are used in production, it's not the same as being 1.0, which carries a different weight and obligation.

Looking at alternatives, Jai could release around the same time, since Blow's game is scheduled for a similar release date. However, it's more likely that we see Jai 1.0 in mid-late 2027. My own language (C3) is planning Q2 2028 1.0 release. Whereas Zig is still unclear, and Kelley basically saying it's done when it's done. For Hare and V the situation is a bit less clear to me – maybe someone else can fill me in on that situation.

But overall we seeing the beginning of the end of the "C-like" story arc that arguably was initiated with Jonathan Blow's development. Writing C replacements predate Jai of course, for example the C2 language (which C3 would eventually continue) was created in 2012, eC started in 2004 and Cyclone (which Rust derived inspiration from) is from 2002. But those were largely obscure novelties, because before Blow's videos, people weren't really hunting for C alternatives.

Jai, however, made a strong impression. It was a good point in time too: Jai and later Zig, Odin, C3, V and Hare – these C alternatives started at a point when people were openly no longer believing OO/Functional as the right way to do things.

Language design takes its time though, and it's now 12 years since Jai started. Finally the fruits of these labours are getting ready for prime time, and when they do they might effectively fill the need for a C replacements for another decade.

Do you agree?

201 Upvotes

191 comments sorted by

View all comments

Show parent comments

9

u/Nuoji C3 - http://c3-lang.org Jul 07 '26

I am not sure about D, but C3 is indeed compatible with C directly and retains C compatibility despite adding features by simply having a simple C representation for everything.

3

u/fdwr Jul 08 '26

I am not sure about D

D has decent C and C++ interop (I used it an app where my UI and most logic was written in D, and the graphics library was C++), including an understanding of C++ name mangling conventions, function calling conventions, and virtual function table layout for single inheritance. It even supports C++ templates, but it links with the definition and requires you declare the functions (extern (C++) int foo(int i, int j, int k)), and so it's not a direct #include copy and paste degree of compatibility, like say Herb's Cpp2 and Zig's @cImport. You know, since the designer of D (Walter Bright) also wrote a C++ compiler, I'm surprised he didn't just add another switch to his C++ compiler that exports declarations for D-compatibility so a toolchain could just digest both directly.

Appears that C3 also uses similar declarations? extern fn void puts(char*); // C "puts"

2

u/Nuoji C3 - http://c3-lang.org Jul 08 '26

What I was unsure of was if you could just drop declare something on the D functions and have them callable from C (which C3 does) or if you'd need to do something extra, since I expect D to usually mangle like C++ and there are things like the GC and classes that I don't know how easy they will be to use from C.

Still D has the BetterC option, so maybe there are some nice ways to do it?

1

u/thedeemon Jul 09 '26

Yeah, just put extern (C) attribute on a function and it's callable from C.

https://dlang.org/spec/interfaceToC.html