June 29, 2006

Memory management

God dammit I &^%$ hate having to do my own memory management. How much time is wasted in software development around the world just trying to track down that leaked pointer or that null pointer dereference? AUGHGHHHH.

"Something's been sticking in my craw. No surprise there; I was born with an unusually narrow craw." --Stephen Colbert

Posted by blahedo at 10:57am on 29 Jun 2006
Comments
It's all a matter of tradeoffs. Yeah, you have to do your own memory management in C, but a C program works just about everywhere and is much less likely to run afoul of API and ABI versioning issues. In C++ there are more ways to avoid manual memory management, but binary compatibility is tenuous. Java has garbage collection, but it is no fun to write in (consider the abortion that is JavaBeans) and one must be alert to which version of the VM and APIs one will be deploying on. C# is a lovely language with garbage collection, but you are either tied to Windows or you use a free but incomplete implementation of Microsoft's .NET APIs. Ruby is a fantastic language, but it's a bit slow and one must be wary of various extensions/libraries stepping on each other's toes. Languages I haven't mentioned have their own tradeoffs as well. Posted by Greg at 11:26pm on 1 Jul 2006
Have you seen Java 1.5? Way more fun to write in. As for the API comments, well, I don't remember this happening back in the day, but for at least the last six or seven years, any time g++ got upgraded you had to go through and change tons of code. C is no fun to write anything big in, because it's such a low-level language. I do enjoy a lot of C++ features (operator overloading may be dicey from a maintainability perspective, but it sure is fun!), I just wish I didn't have to manage my own memory. (Yes, yes, Boehm collector, I know. One of these days.) Posted by blahedo at 1:31pm on 2 Jul 2006
Post a comment









Is the year AD1900 in the future or the past?
 [?]

Remember personal info?






Valid XHTML 1.0!