3 ms·
I have little experience with C but my feeling is that it's a waste of time to have to deal with memory in my program. I don't just have to worry about the pro
by sanbor 9y ago
I have little experience with C but my feeling is that it's a waste of time to have to deal with memory in my program.
I don't just have to worry about the problem that I'm trying to solve but also about handling the memory properly.
Of course there are scenarios where writing a fast and lightweight app is part of the problem but for many projects that's not the case.
I'm fine with pointer arithmetic and all that but I'm not fine with the constant fear that I did some oversight and my app is going to crash and I'll have to spend time debugging what's going on.
- Retra 9y agoMost programming problems are pretty trivial to solve if you're willing to ignore performance. It behooves us to realize that the main difference between mathematics and computer science is that computer scientists have to account for the several orders of magnitude difference between the runtime costs of different operations. If that weren't an obstacle, we'd basically only need one programming language, and it would like pretty much like standard mathematics. So I interpret your comment as something like "I don't want to program, I just want to assemble mathematical statements", which is a fine and perfectly legitimate thing to do, but it also seems a bit lazy, impractical, and probably irrelevant, given the subject.
- sanbor 9y agoMy point was about why invest time in C dealing with memory with the risk of segfaults when there many other languages like JS, Java, Go that would take care of that task for you. Also I'm talking about projects (e.g. building a word processor), not programming problemns (e.g. invert this binary tree). In my experience projects are complex systems with many moving parts interacting and most bugs comes from the complexity of the system/problem. With C, I don't just have to think about the problem that I'm solving but if I did something wrong when dealing with memory allocation/releasing. I don't have much experience in C except from the basics so I hope to hear from people that loves C why they choose it or if its just a constraint inherent to the problem they're dealing with.