|
|
|
Ask HN: C Language Successors
|
|
6 points
by blueredmodern
617 days ago
|
|
For those of you who have experimented with potential C language successors, what are pros and cons and your experiences with them? I am talking about languages like Zig, Odin, C3, Hare, V and possibly Nim and Crystal, assuming that they are considered systems programming languages. |
|
Basically, it should be reasonable for one average dev to write a naive compiler in a reasonable little time.
Maybe it is better to cleanup the C syntax a bit: only sized types (u8/16../u64, f32/f64, s8...) namely inverting the primitive types; no implicit cast (except from literals and void*) or integer promotion, real hard compiler constants (re-definition of const keyword?); no switch keyword; only one loop keyword (loop {}); a clear split between static cast and runtime/dynamic cast? (should give more thoughs to it, since only static cast seems to mean something); all those _generic, typeof, restrict, TLS, packed attribute (or how to lose the importance of alignment from sight), anonymous code block, stuff which have to go away; nowdays you need inline atomic, barriers, offsetof; and all the other things I am forgetting and of course if actually doing it, more thoughs will be required.
In the meantime I am coding RISC-V assembly which I can run an x86_64.