In the last month or two I have been writing a fair bit of C code.
I really dislike C. But I have not been able to find a language to replace it with, except C++, and that's not much of an improvement for what I did.
Maybe someone can read this and help me. I don't mind learning a new language. Really, it's no problem.
The goal is writing small programs (in the hundreds of lines region), which have the following requirements:
- The program MUST be correct. Can never segfault or crash in some other way.
Since the code is short, I think I have managed, using bstrlib, to get this, after quite a bit of pain, by auditing and unit-testing. But I am not sure, and I will never be.
It would be awesome if the language could be garbage-collected for this reason.
- It MUST have a decent string handling.
The programs handle mail. So, it's strings galore.
- It MUST have very low overhead. The programs should run and end quickly. Very quickly, because people may be waiting for them to end.
- It MUST be a reasonably simple language. I am not a great programmer, and these tools will be hacked at by people with limited programming skills (sysadmins like me!)
- Trivial access to C libraries.
So, let's see.
C: gives 3, 4 (in a fashion), and 5
C++: 2, 3, maybe 4, and 5
D: It seems to give me all of these, along with a C-like syntax... but I can't get it to work yet (correction, I got dmd to work, so it's looking good for D!).
So, any takers?