I'm not very experienced in C, but I've been using it at my job for the past year. Because of the very strict code guidelines in my company, I never get to see colourful code such as the one after your refactor. While I'll wholeheartedly believe that the original (traditional) implementation of the for loop is most likely more readable, maintainable and safer, I can't help but love the implementation that (ab)uses the features of the language to make everything more concise (and probably also more performant). It's helped me see C in a whole new light.
Well, it depends a bit on whether you need to actually do any FFI. For example, Ruby has a markdown parser that uses a C library, but then wraps it and you then don't need to know about it. If you don't do any C interop, I think you don't have to learn C. That said, learning C can help teach some constructs that other languages try to hide from you or that aren't even available in those languages.
I'm not very experienced in C, but I've been using it at my job for the past year. Because of the very strict code guidelines in my company, I never get to see colourful code such as the one after your refactor.
While I'll wholeheartedly believe that the original (traditional) implementation of the for loop is most likely more readable, maintainable and safer, I can't help but love the implementation that (ab)uses the features of the language to make everything more concise (and probably also more performant). It's helped me see C in a whole new light.
Thank you for this video :) I did the CS50 training two years ago (was amazing), and today, I really miss C language
First learned C in the mid eighties. Seeing C programming with an IDE that comprehends context, it make so much more sense now!
Extremely helpful and useful video, looking forward to the exercises on Exercism! Thank you for posting this!
Glad it was helpful!
Considering most languages have a FFI to C, do you consider C something that every developer should know?
Well, it depends a bit on whether you need to actually do any FFI. For example, Ruby has a markdown parser that uses a C library, but then wraps it and you then don't need to know about it.
If you don't do any C interop, I think you don't have to learn C. That said, learning C can help teach some constructs that other languages try to hide from you or that aren't even available in those languages.
👍Thanks!