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.
5mo ago·view thread
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 …
5mo ago·view thread
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…
5mo ago·view thread
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…
6mo ago·view thread
comment
I didn't see any similarities to C3, quite the opposite.
7mo ago·view thread
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 (…
7mo ago·view thread
comment
It would be interesting to hear the motivation for it.
7mo ago·view thread
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 …
7mo ago·view thread
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 `…
7mo ago·view thread
comment
There is https://github.com/c3lang/c3c/issues/829
7mo ago·view thread
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…
7mo ago·view thread
comment
I don't recall exactly, I think we rehashed the same points.
7mo ago·view thread
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…
7mo ago·view thread
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 …
7mo ago·view thread
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…
7mo ago·view thread
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…
7mo ago·view thread
comment
It does compile to WASM.
7mo ago·view thread
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…
7mo ago·view thread
comment
Still looking for a good design: https://github.com/c3lang/c3c/issues/829 …
7mo ago·view thread
comment
Maybe these two could be interesting? https://lowbytefox.dev/blog/from-zig-to-c3/ https://alloc.dev/2025/05/29/learning_c3 …
7mo ago·view thread
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…
7mo ago·view thread
comment
Maybe also worth mentioning is that some static analysis is done using these contracts as well. With more coming.
7mo ago·view thread
comment
This one could perhaps have been a little more in-depth. Still, I shouldn't complain.
8mo ago·view thread
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(..…
8mo ago·view thread