Live data from Hacker News

Show HN: The C3 programming language (C alternative language)

github.com

1–10 of 192 posts

Show HN: The C3 programming language (C alternative language)

#1
Get it from here: https://github.com/c3lang/c3c

In 2019, while contributing to the C2 language, I started up "C3" as a pet project while waiting for pull requests to be approved...

Now it's 6 years later and C3 well on its way to 1.0, having released 0.7.0 last week.

Unlike other C alternatives, C3 tries to evolve C – but without concern to backwards compatibility to the latter.

What it adds to C is among other things:

- Module system

- Semantic macros and compile time introspection

- Lightweight generic modules

- Zero overhead errors

- Build-in slices and SIMD types

- Gradual contracts

- Built-in checks in debug mode

You can find more details on the site: https://c3-lang.org It might be interesting to look at the examples: https://c3-lang.org/language-overview/examples/ so see how the language looks for some simple examples.

Some other links that might be interesting follows:

I've posted about C3 on HN before, notably

- https://news.ycombinator.com/item?id=24108980

- https://news.ycombinator.com/item?id=27876570

- https://news.ycombinator.com/item?id=32005678

Here are some interviews on C3:

- https://www.youtube.com/watch?v=UC8VDRJqXfc

- https://www.youtube.com/watch?v=9rS8MVZH-vA

Here is a series doing various tasks in C3:

- https://ebn.codeberg.page/programming/c3/c3-file-io/

Some projects:

- Gameboy emulator https://github.com/OdnetninI/Gameboy-Emulator/

- RISCV Bare metal Hello World: https://www.youtube.com/watch?v=0iAJxx6Ok4E

- "Depths of Daemonheim" roguelike https://github.com/TechnicalFowl/7DRL-2025

Show HN: The C3 programming language (C alternative language)
github.com

Re: Show HN: The C3 programming language (C alternative language)

#2
I have used this language for a few things (csv parsing and some simple personal cli tools). Other than the normal pre-1.0 issues it's great. I wish it had a tagged union type, but it looks like that's planned based on the github issue tracker.

It is a pretty big improvement on C without changing the ABI. Maybe not the improvements I would make if I was smart enough to make a compiler, but better than doing C which I also enjoy despite it's warts.

Re: Show HN: The C3 programming language (C alternative language)

#6
post #4

[dead]

Programming language dev is quite common. I've been cataloging various languages on r/altprog on Reddit. This particular one seems to have influences from several other languages (quite a few use "fn" for function declaration, plus there's a module system).
Post reply on HN