back
user profile
lerno
1,422karma·409submissions·April 1, 2014
recent activity (409 total)
comment
Oh, I think you missed something then: There is both `$if` and `$switch` compile time statements for this: https://c3-lang.org/generic-programming/compiletime/#if-and-... At…
comment
But you have to. Ambiguities hint at lack of redundancies that also affects code reading. When you quickly scan something like `file.open` vs `file::open` the former is also more unclear to a reader w…
comment
C3 has "path shortening", so for example given `open(...)` in std::io::file is usually used as `file::open(...)`. If we would to write this as `file.open(...)`. Consider now the case of mist…
comment
C3 follows the C ABI, so no it doesn't do it and it's not planned.
comment
What kind of conditional compilation are you missing?
comment
Other than C3, there is Jai, Odin, Zig and Hare which are the ones that have any traction right now that I know of. Many interesting projects have been started but ultimately later abandoned. Going to…
comment
Just to be clear, I don't mean the description of Zig to put down the language or the community. It's the best I can do to describe the difference between Zig on one hand and Odin/C3 on…
comment
If you pass them as parameters, then there are in/out/inout annotations to limit usage. But other than that, there isn't anything.
comment
For what it's worth, I found the Zig community on the biggest Zig discord very nice and welcoming. But that said , there is a lot of "you have to understand Zig" sentiment. Also, the…
comment
Did you see this? https://c3-lang.org/language-common/cinterop/
comment
I wrote a short blogpost about this before, trying to answer the question: https://c3.handmade.network/blog/p/8886-why_does_c3_use_%252... …
comment
As the author, let me add something beyond the comparison. Zig and Odin are very different languages, Odin is – as its slogan goes - "for the Joy of Programming". Zig on the other hand doesn…
comment
`::` simplifies the module vs identifier resolution. In C3 there is something called "path shortening", allowing you to use `foo::bar()` in place of something like `std::baz::foo::bar()`. To…
comment
The other articles on C3 can found here: https://ebn.codeberg.page/programming/c3/ …
comment
1. C is universal, any other language is a dependency. 2. If you're using something like C# or Kotlin or whatever, then you're not serious about compilation speed. 3. You will need to provid…
comment
No, just no
comment
The QBE author has said that good compilation speed was not a design goal. It also outputs asm which then has to be run through GCC or Clang, which nullifies any benefit of being a standalone backend.
comment
There isn't anything official. Tonis maintains an "Awesome C3" repo on GitHub: https://github.com/tonis2/Awesome.c3 (curation is all done by Tonis, I don't ha…
comment
Feel free to post any questions about C3 and compiler dev in the comments.
comment
I find that the hard part with designing macros and other metaprogramming constructs that run at compile time is not adding POWER - that part is easy, but to make it readable and easy to understand. I…
comment
Some people love this, some think it’s a necessary sacrifice - a rite of passage to endure in order to produce ”optimal” software. Others try Odin or C3 instead.
comment
`goto` is trivial to implement. `goto` doing the right thing jumping over `defer` and implicitly unwrapping optionals (flow-typing) is less nice as you suddenly need to track much more things in the f…