I like how c forces you to think deeper

1 month ago 35

I just tried a backtracking problem and realized how much more rigorous you need to be with C than with languages like Python. You wouldn't want to do braindead loop like in python and check it against a "path" of explored options, because compiling the path into an array itself is difficult/annoying to do with all the memory sorcery you'd need to do. Unlike python where you can just use append/pop to modify things in place and not risk stack overflow because checking membership is so easy, C forces you to optimize your algorithm and think carefully about how you want your code to work. You can no longer cheat with language specific tricks you actually need to plan out each path properly and make sure a function is bijective for example.

submitted by /u/Icy-Advice-9024 to r/C_Programming
[link] [comments]
Read Entire Article