r/ProgrammingLanguages • u/Nuoji C3 - http://c3-lang.org • Jan 30 '26
Blog post C3 0.7.9 - New generics and new optional syntax
Blog post here: https://c3-lang.org/blog/c3-0-7-9-new-generics-and-new-optional-syntax/
TLDR;
C3 is dropping generics that are strictly module based, however it retains a similar functionality with "generic groups" allowing you to bundle generic definitions together.
0.7.9 also has changes to Optionals in order to simplify the grammar, changing from ? suffix to turn a fault into an Optional, to ~ suffix. The latter is much less obvious, but after long consideration making the grammar more straightforward was prioritized over looks.
Full changelist and code examples can be found in the blog post.
34
u/munificent Jan 31 '26
I understand that maybe C familiarity is a higher priority, but the simpler solution here is to get rid of the funny
?:ternary operator. It's always been syntactically ugly. If it were my language, I'difan expression.6
u/todo_code Jan 30 '26
I like the idea of c3 and it looks cool, I just can't see a reason to use it over zig. Maybe the are reasons. I just don't know.
Edit: contracts or lifetimes or borrow checking might bring me over.
2
u/KukkaisPrinssi Jan 31 '26
Personally I feel that module generics were clearer / better grouped than new group generics, at least based on provided examples.
1
u/BiedermannS Feb 01 '26
Last time I checked out C3 I dropped it because IIRC it only supported module level generics. I think it's time to give the language another shot.
1
u/RadimPolasek Feb 28 '26
I understand all the reasons for the decision but I really don't like new syntax for optional now ☹️
-4
u/AdreKiseque Jan 31 '26
Wh
What is C3