back
user profile
lerno
1,422karma·409submissions·April 1, 2014
recent activity (409 total)
comment
> However we value explicitness and allow the developer to do anything they need to do* * except for having unused variables. Those are so dangerous the compiler will refuse the code every time.
comment
It’s good to see that this is finally addressed. It’s been a well known broken part of the language semantics for years. There are similar hidden quirks in the language that will need to be addressed …
comment
C3 0.7.10 introduces constdef, syntactically and semantically making a clear distinction between proper enums and "enums is collection of constants". Other improvements in this release: - Mu…
comment
C3 is a language designed as an evolution of C, without retaining strict backwards compatibility, but excellent interop with C. This version departs from its rather uncommon module-based generics, but…
comment
I didn't see any similarities to C3, quite the opposite.
comment
C2 ( http://c2lang.org ) similarly compiles to C, but arguably more readable C code from what I can see. The benefits are (1) easy access to pretty much any platform with little extra work (…
comment
It would be interesting to hear the motivation for it.
comment
But it of course move semantics and destructors affect all things. If the goal is to call and be callable from C without special constructs, how would you make the C code respect the move semantics …
comment
They have different wins. I think labelled break/continue help because they are clearer in locally expressing what the point is. If you see `goto NEXT;` you can kind of guess the intention, but `…
comment
There is https://github.com/c3lang/c3c/issues/829
comment
That's the kind of thing I was thinking about. You can solve that with a switch in C3, but it's not as nice. However, this accounts for no more than 1% of all my goto uses (from a quick insp…
comment
I don't recall exactly, I think we rehashed the same points.
comment
Please consider a variable `List{int}[3] x`, this is an array of 3 List{int} containing List{int}. If we do `x[1]` we will get an element of List{int}, from the middle element in the array. If we then…
comment
Let's say you have find foo::bar(), then we know that the path is <some path>::foo, the function is `bar` consequently we search for all modules matching the substring ::foo, and depending …
comment
Of course you can explicitly shorten paths. I was talking about C3's path shortening which is doing this for you. This means you do not need to alias imports, which is otherwise how languages d…
comment
Two reasons, the second being the important: (1) If I read "io.print", is this "the print function in the module io" or "the print method for the variable io". There tend…
comment
It does compile to WASM.
comment
In C3 it's complicated. On one hand the lack of goto means defers are more straightforward, but the biggest problem is that once you have a different way to handle cleanup and you have labelled b…
comment
Still looking for a good design: https://github.com/c3lang/c3c/issues/829 …
comment
Maybe these two could be interesting? https://lowbytefox.dev/blog/from-zig-to-c3/ https://alloc.dev/2025/05/29/learning_c3 …
comment
The difference from an assert is that for "require" they are compiled into the caller frame, so things like stack traces (which is available in safe mode) will point exactly to where the vio…
comment
Maybe also worth mentioning is that some static analysis is done using these contracts as well. With more coming.
comment
This one could perhaps have been a little more in-depth. Still, I shouldn't complain.
comment
C3 is a language designed as an evolution of C, without retaining strict backwards compatibility, but excellent interop with C. This version brings - among other things: struct splatting (some_call(..…