|
|
|
|
|
by sylware
620 days ago
|
|
All I know, is those "successors" should have a simpler syntax than C (since its syntax is already way too complex), and should have pointers, no garbage collection, no hard dependency on a complex runtime, etc. 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. |
|