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-Ma7c5cae0161b39297ec32282 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
