Wednesday, January 03, 2007
D: By Jove, they almost have it!
When I first saw C++ back in the mid-1980s, it looked pretty interesting. Then it started to grow into a horrible monster. I was just reading about the D programming language today. All I can say is, "Wow!" I wish they had this way back when. This would seem to correct most of what I find distasteful about C, C++, and Java, while keeping most of the things I like--to the point where I would actually consider using it for certain projects.
The things I hate most about those programming languages are:
C
- No objects
- Manual memory management only
- Lame macros
- Having to define header files
C++
- Complex, obscure syntax that I can't ever remember completely without a copy of The C++ Programming Language sitting next to me
- Complex resource management schemes to avoid leading memory/etc. in the presence of exceptions
- Did I mention that I hate the complex syntax?
Java
- (Almost) Everything is an object (but not quite)
- Having to run in a VM with bytecodes even when you're writing something for a single platform and don't need or want to
- No ability for structures to overlay memory for efficient access to C and network data wire protocol data structures, forcing the programmer to do bit-twiddling with ByteArray and shifts and masks
In short, D looks interesting. Is it Lisp and would I go back to using D as my main programming language? No. It still doesn't have macros the way Lisp does and it doesn't have sexprs (yes, I really do like the parenthesis), but it is a better follow-on to C than C++ and still hits the system-programming domain that Java missed so bady. It seems like something to keep in one's hip pocket.
Having to run in a VM with bytecodes even when you're writing something for a single platform and don't need or want to.
Considering that one could compile Java to the native code with GCJ(free) or other similar technologies for years, this is a strange statement.
Realize that GCJ only recently got good enough that it could actually compile programs of substance. As of 3 or 4 years ago, that wasn't an option. I agree that as of today this is less of an issue.
Post a Comment
Links to this post: