HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Joshringuk

no profile record

comments

Joshringuk
·last year·discuss
I would agree for the most part but I found C3 to be a significant simplification over Zig. I struggled very hard with Zig but found C3 to be much more straightforward.

Syntax wise it's different but philosophically it is quite similar to Go's strive for simplicity, but less extreme, much lower level and more C like syntax.
Joshringuk
·last year·discuss
@lerno is a ganedev himself so should be able to answer your question there

Some links

https://c3-lang.org/getting-started/

https://c3-lang.org/getting-started/design-goals/

https://c3-lang.org/faq/compare-languages/

The blog is on the internet archive https://web.archive.org/web/20250330145704/https://c3.handma...
Joshringuk
·last year·discuss
Yes the temp allocator will remove things at the end of it's scope. It makes it very clear when memory will be affected and gives predictable code execution.

There are other contexts for managing mutex locks so they auto close and you could dream up one for database connections and transactions too.

The nice things about a context is you can always see it's there, destructors by design are a bit hidden which can make code harder to reason about.
Joshringuk
·last year·discuss
You can define your own "built-ins" types and functions(!) so that should make it indistinguishable.

You can also extend the standard Library from inside your own project, modules are open for extension
Joshringuk
·last year·discuss
True, C3 at least is one breaking release per year and between those there are non-breaking additions.

It's quite common for a project to pin to a stable version so this doesn't seem too unpredictable.
Joshringuk
·last year·discuss
Standardisation of code and examples across codebases is a nice result of this too. This makes the code easier to learn and share
Joshringuk
·last year·discuss
I have found C3 to be a generally simpler experience than Zig, it's fun to use while being low level. The general approach is aiming to be easy to use, personally I often compare it to Go philosophically but with more similar use cases to C and lower level.