I spent a bit of time with the zig port, long enough to be reminded just how good a job the Go team did with making a portable language, including the runtime.
The acid test for portability, for me, is simple: if it can run on Plan 9 and Unix and WIndows and OSX and bare metal, it's portable. Anything else is not. As examples: C89 and Go pass the test for me. Zig, to me, is not a portable language; it's only portable in the sense of "portable to things mostly like unix". I was disappointed in Zig, once I got a bit deeper into the code. So I stopped. On Tue, Aug 12, 2025 at 7:51 AM sirjofri via 9fans <[email protected]> wrote: > Hi, > > 12.08.2025 14:57:22 Alyssa M via 9fans <[email protected]>: > > I'm afraid I still use C89. I've never found a language I like better. > It has everything I need and my compiler usually produces the assembler I > would have written anyway, and much more quickly. The (cast) operator is my > favourite feature. I never bothered to implement typedefs, unions, or > gotos, though: no language is perfect and I think they were not such good > ideas. > > Honestly, I really like typedef and goto, at least the way they are used > in Plan 9 code. Unions also have their place, though I rarely use them and > it often makes more sense to not use them to prevent overoptimization. > > I like gotos for early function exits when I have multiple exit points and > always have to do the same thing, as well as for function cleanup. Sure, I > could choose not to use goto, but a few little gotos makes the code more > readable. > > Typedefs save my sanity. I don't want to write "struct mystruct" every > time I need that type, so a simple "typedef struct mystruct mystruct" can > make the code so much more readable if you stick to that same pattern > throughout your codebase and limit the usage to that. Typedefing weird > primitive types on the other hand is rarely useful, with the exception of > enums. > > All that said, this is all syntactic sugar, as C could also be described > as syntactic sugar on top of assembly. In the end, you can deal with the > memory as you like. C just gives you a bit more type safety. > > I never understood why people have so much trouble understanding pointers, > so maybe I'm the weird guy. > > Regarding zig, it's a bit sad, but understandable. I never wrote any zig, > but I found a few concepts quite interesting. > > sirjofri ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Ta74fdc99bf0151a0-Mbe9a83a17723dbcd43ad9ae4 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
