I had read two books in the meantime that really flushed out more of the C language to me and I would definitely recommend them to those who want to learn more about the language. They are Head First C by Dave and Dawn Griffiths and 21st Century C by Ben Klemens. I’m also aware that The C Programming Language by Brian Kernighan and Dennis Ritchie is also known as the canonical text. The book is often referred to as ‘K&R’ after the authors’ initials, and Dennis Ritchie was the original creators of the C language and co-developer of Unix. I’d love to get a chance to read it someday.
This article appeared on Hacker News and really piqued my interest. Defenitely a great read. What really stuck out to me was one of the comments though. The author of the comment mentioned a less ugly syntax for function pointers, with a link to an example. Now I’m not sure what the commenter meant by “these params decay naturally to function pointers” but I was skeptical about this different syntax. Even the Wikipedia article used the syntax that I was familiar with. So I wrote up a quick example to try it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Sure enough we get:
1 2 3 4 5 6 7