4 ms·
C3 (a C-like programming language) hits 0.6.6
For people who don't know what C3 is, it's a C-like language which aims to be an evolution on C rather than a whole new language.
With that out of the way:
C3 is continuing monthly releases of 0.6.x. This summer the development of C3 will turn 6 years old. When mentioned as a "new C language alternative", C3 is referred to as a "young" language. Just so that other language creators have an idea how long it takes for a language to get established. For comparison: Jai is almost 11 years in development, Zig 9 years and Rust – finally becoming a mainstream language - started development almost 19 years ago!
By April, version 0.7.0 will be released, removing deprecated code. The plan is to have one "dot one" release each year until 1.0 is reached (and if everything goes according to plan, the version after 0.9 will be 1.0).
For people following C3, this +0.0.1 release had some language changes:
1. Enum conversions starts preferring `MyFoo.from_ordinal(x)` / `foo.ordinal` instead of `(MyFoo)x` and `(int)foo`.
2. Ref arguments for macros are getting phased out to simplify the language, since they can be replaced (although not perfectly) by expression arguments.
3. Allowing the main method to return `void!` is deprecated since it led to rather poor coding practices. This also simplifies the language. Test and benchmark functions get a similar change.
4. Compile time `$foreach` now iterates over string literals, which was missing.
The standard library is also seeing some incremental improvements, including `foreach`-compatible iterators for `HashMap`.
In terms of bug fixes, it sees a fairly large amount of bug fixes, mostly on more obscure parts of the language.
For 0.6.7 compile time mutation of compile time arrays will finally be permitted. And perhaps enums might finally have the missing "enums-with-gaps" resolved (currently, enums are strictly numbered 0 and up).
More importantly though, C3 will see the beginning of work to prune unused features from the language, which will then eventually be removed with 0.7.0.
This will be an ongoing job, to take the still somewhat uneven features of 0.6 and remove anything redundant and unused, as well as making sure that they don't have unnecessary special cases.
Blog post with the full changelog: https://c3.handmade.network/blog/p/8983-another_monthly_release__c3_0.6.6_is_here
Link to the C3 homepage: https://c3-lang.org
Finding it on Github: https://github.com/c3lang/c3c
- lerno 2y agoFeel free to post any questions about C3 and compiler dev in the comments.
- stefanos82 2y agoSlowly but steady we are getting there; congrats on the latest release! I wanted to ask: is there a place, like a showcase, where I can share two tiny examples I created in C3? Well, one of them consists of multiple languages, C3 being one of them, but the other is a Fibonacci implementation written in C3. Any suggestion? https://github.com/stefanos82/colors https://github.com/stefanos82/colors https://github.com/stefanos82/fibonacci https://github.com/stefanos82/fibonacci
- lerno 2y agoThere isn't anything official. Tonis maintains an "Awesome C3" repo on GitHub: https://github.com/tonis2/Awesome.c3 https://github.com/tonis2/Awesome.c3 (curation is all done by Tonis, I don't have any say what goes into it). Share it on the C3 discourse: https://c3lang.discourse.group https://c3lang.discourse.group or the C3 discord (but I think you already did that?) Other than that... r/Programming, r/C3Lang and r/ProgrammingLanguages might be considered.
- stefanos82 2y agoNice! I will let Tonis know about it and add it in the aforementioned repo. Cheers!
- childintime 2y agoMany examples are at https://learn-c3.org/ https://learn-c3.org/
- childintime 2y agoTo get a feel for the language explore https://learn-c3.org/ https://learn-c3.org/. It has a live coding environment, and apparently all language constructs are exemplified.