News for hackers. Stuff that matters.
Re:Ask HN: How do I learn C properly? by makz on Sunday March 08, 2020 @03:46PM (#22520101)
I'd say there's no proper way. Every project has its way of writing C. With the use of macros, sometimes it looks a bit like a DSL for every specific project.

My advice: think about what kind of software you want to write and look for similar projects, libraries, or contribute with a new module, functionality, adapt something to your needs...

Re:Ask HN: How do I learn C properly? by pritovido on Sunday March 08, 2020 @04:06PM (#22520230)
I would advice AVOID C macros at all cost. They are so weak and hard to debug and problematic.

I write in several languages and read lots of C projects made by others and find the affirmation hard to believe: C is so simple that is very easy to read if the writer of code has a minimum of competency.

You can say that of projects like C++, specially things like C++11 that are languages by committee so complex that you can affirm that every C++ programmer is different or find programmers that could not understand each coder's code. Not so with C.

That happens to me with C++ and lisp code. It takes a while for me to understand what the author uses(or abuses) before being able to understand the code. That does not happen with C code.

Re:Ask HN: How do I learn C properly? by mrr54 on Monday March 09, 2020 @10:07PM (#22532113)
The Linux kernel uses lots of macros, many of them with lowercase names that are barely distinguishable from function names. Given the quality of that codebase, I think not using macros is a bit silly.