IMHO Zig is indeed a better C (and not a better c++; anything can be considered 
a better c++ ...). The comptime feature would allow to have generics in the 
plan 9 codebase, and there are lots of duplicated code in plan 9 that 
reimplements again and again a list, a hashtbl, a growing array. So that would 
be factorized with Zig. The error management with defer and ! try/catch would 
also benefit I think in Plan 9. The waserror/nexterror of the kernel and 
setjmp/longjmp is fragile IMHO and the Zig error and defer is I think better.

People also value a lot Zig for its cross-compiling ability and this is moot 
for Plan 9 which had the same thing 30 years ago, but for Zig the language 
itself, I would argue the Plan 9 code would look better in Zig. That said I 
don't think it would be significantly better; I don't think a rewrite would be 
worth it (even though now with AI rewriting code in other languages is far 
cheaper than before).

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Td859d3c6cefc922f-M2a0aba28acf8d63a090ad42f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to