this post was submitted on 12 Feb 2026
59 points (100.0% liked)

Learn Programming

2086 readers
8 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

I don't need something practical. I just need something fun to keep me motivated.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] orclev@lemmy.world 1 points 2 days ago (1 children)

It's a bit safer and a lot more convenient to use, but still lets you do dangerous things with pointers. At its core it's still fundamentally the same as C just with a bunch of helpful tools and features to make doing all the stuff you do in C easier and more convenient.

Really the biggest thing it does significantly better than C is its macro system. C macros are "dumb" in that the C pre-processor does a simple find and replace on the source files without doing any kind of processing on the underlying C code so you can E.G. write C macros that spit out mangled illegal C code when you run them. Likewise a C #include is literally the same thing as copy and pasting the contents of the included file before it gets fed into the compiler.

Zig on the other hand has a smart macro system that's actually aware of the zig code and works in concert with it at compile time.

[โ€“] ageedizzle@piefed.ca 1 points 1 day ago

Okay that makes sense. Thanks for the comparisons here