When I started coding at my first job almost 20 years ago, it was at an OS/2 shop using C and Presentation Manager. I had several different languages in college so I wasn't too phased by the 1-2 week C training course we got. What I wasn't prepared for was memory management, C style string handling, message-driven applications, just to name a few.
I began my dislike of C early with the insanity called string handling. I was pleased when I found out that Joel agrees with me. Although there are plenty of people who will defend how 'intuitive' the string functions are, I knew there were much simpler ways to manipulate strings as long as you didn't need one larger than 255 characters, in which case using a char* buffer would be fine. Writing apps in something other than C was dismissed offhand with statements like, "C is much closer to the metal", "You don't have the run-time bloat of other languages", or "You have so much more control with C" which almost sounds like a masculinity test or something. Think lumberjacks and "my chainsaw is bigger so only the strongest can use it" type argument. Nowadays, this type of behavior would remind me of The Code Monkey.
Even 2 decades ago, it was possible to call code written in one language to call code written in another; in school we called assembly graphics routines from within Ada code for one class assignment. Notable exceptions are running compiled code from within scripts or executing a system command from within compiled code; but rarely do we write a library in C++ to use in our Java app. When Java first appeared and it was still slow, I never understood the resistance to writing the main app in Java and moving the bottleneck code into some C/C++ dll and called using JNI. It's like we use the "language X sucks at a, b, and c so we can't use it" as a shield that keeps us from having to design multi-language applications.
So, after all these years, what keeps us from writing multi-language apps?
Wednesday, July 15, 2009
Subscribe to:
Post Comments (Atom)
I think I read where the guy who brought NULL pointers to C repented and said it was a mistake. What would C have been like if it started with references and never had pointers? Fewer memory leaks, no dangling pointers, no garbage pointers, no double freeing .... wow that would have made writing and maintaing C programs so much easier!
ReplyDelete"So, after all these years, what keeps us from writing multi-language apps?"
ReplyDeleteEverything must be solved with a hammer. The hammer is the greatest tool ever! The screwdriver, wrench and saw are all deficient because they are not the hammer.
Ugh.