Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lerno
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
lerno
7mo ago
> Not at all, if the team needs 30 more years they should take it. Yes, I understand that is the opinion in the Zig community. As an outsider, it seems odd to me to pick a language that I constantly need to maintain. >> However, th
32.
▲
by
lerno
7mo ago
I am using games, because they pop up more often (gamejams etc), but we can see the same if we'd look at utility apps. Do you want to broaden that to "Odin is more explicitly marked towards writing applications", but if so wh
33.
▲
by
lerno
7mo ago
> 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.
34.
▲
by
lerno
7mo ago
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 at some point, such as integer promotion
35.
▲
C3 0.7.10: constdef Takes Shape
(c3-lang.org)
2 points
by
lerno
7mo ago
|
1 comments
36.
▲
by
lerno
7mo ago
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: - Much improved MSVC cross compilation - Qua
37.
▲
C3 0.7.9 with Updated Generics
(c3-lang.org)
5 points
by
lerno
8mo ago
|
1 comments
38.
▲
by
lerno
8mo ago
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 doesn't go all the way to C++ styl
39.
▲
by
lerno
9mo ago
I didn't see any similarities to C3, quite the opposite.
40.
▲
by
lerno
9mo ago
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 (2) significantly less long term work com
41.
▲
by
lerno
9mo ago
It would be interesting to hear the motivation for it.
42.
▲
by
lerno
9mo ago
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 and destructors?
43.
▲
by
lerno
9mo ago
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 `continue OUTER;` doesn't require yo
44.
▲
by
lerno
9mo ago
There is https://github.com/c3lang/c3c/issues/829
45.
▲
by
lerno
9mo ago
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 inspection), which is too little to build a
46.
▲
by
lerno
9mo ago
I don't recall exactly, I think we rehashed the same points.
47.
▲
by
lerno
9mo ago
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 further index this with [5], like `x[1]
48.
▲
by
lerno
9mo ago
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 on whether (1) we get multiple matches (
49.
▲
by
lerno
9mo ago
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 do it. I don't want to get too far i
50.
▲
by
lerno
9mo ago
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 tends to be an overlap in naming here so tha
51.
▲
by
lerno
9mo ago
It does compile to WASM.
52.
▲
by
lerno
9mo ago
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 break/continue, and you have the nex
53.
▲
by
lerno
9mo ago
Still looking for a good design: https://github.com/c3lang/c3c/issues/829
54.
▲
by
lerno
9mo ago
Maybe these two could be interesting? https://lowbytefox.dev/blog/from-zig-to-c3/ https://alloc.dev/2025/05/29/learning_c3
55.
▲
by
lerno
9mo ago
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 violation happened. Because of inlining the
56.
▲
by
lerno
9mo ago
Maybe also worth mentioning is that some static analysis is done using these contracts as well. With more coming.
57.
▲
I switched away from Zig to C3
(lowbytefox.dev)
6 points
by
lerno
9mo ago
|
0 comments
58.
▲
by
lerno
10mo ago
This one could perhaps have been a little more in-depth. Still, I shouldn't complain.
59.
▲
Programming language C3 release 0.7.8 is out
(c3-lang.org)
1 points
by
lerno
10mo ago
|
1 comments
60.
▲
by
lerno
10mo ago
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(...a_struct, 1, 2)) and vector swizzle ini
More ›