#Is Zig a smaller language than C?
1 messages · Page 1 of 1 (latest)
It definitely has a more robust stdlib, which doesn't matter since you can selectively use only what you need
it has more features, but also gives you more power over a lot of stuff, like allocators, configurable stdlib stuff, etc
where C has an implicit default allocator with malloc and free, zig as a language has no knowledge of allocation directly, and instead leaves it to the user to decide how to allocate
I would personally say so
C has a lot of weird things going on, an artifact of its age
It is not complex, so it is not that bad, but there are certain choices which are unnatural to say the least (for example, the array handling is not what you would expect if you were accustomed to modern languages)
I guess it depends on your level of experience though
Zig really does not have good documentation imo
Yep. You need to realize that C has been around for decades so there is MUCH more material available for learning C. So you have more resources for learning and debugging when you get stuck. Zig has far fewer resources (but there are plenty of friendly and helpful people to help)
Language complexity is not the most relevant factor in how easy it is to learn imo
brainfck is super simple
not the easiest language to write something in though
I recently gave an opinion on another thread that I think is also relevant here: <#1083425120623808562 message>
the best part: 99.99% of that material is flat out wrong and teaches HORRIBLE practices. a friend of mine recently went through the very highly regarded book https://gustedt.gitlabpages.inria.fr/modern-c/ by one of the most well respected authorities on the c language. my friend sent me some random snippet of code from the book, asked some dumb question about it. after answering his question, i took a look at the snippet, ran it through my brain's compiler, and within like 5 minutes i had found an insidiously nasty bug caused by a misunderstanding/oversight of c's nuances that had been in the book for many years. well what do you know, my friend reported it and the author agreed and fixed it. if the literal authority on c isnt able to make a book for learning without making insidiously nasty and hard to find bugs and no one finds them until now, then maybe its hard to actually learn the c programming language
that bug aside, that book is 100% the best resource for learning (mostly 😂) correct C
Yeah I've read this book. Its not bad but it has many incosistencies
I'm very curious, what was the bug? (feel free to dm to avoid spamming help post)
Or feel free to spam, I’m interested too :)