Skip to main content

Ralsina.Me — Roberto Alsina's website

The missing language

In the last month or two I have been writ­ing a fair bit of C code.

I re­al­ly dis­like C. But I have not been able to find a lan­guage to re­place it with, ex­cept C++, and that's not much of an im­prove­ment for what I did.

Maybe some­one can read this and help me. I don't mind learn­ing a new lan­guage. Re­al­ly, it's no prob­lem.

The goal is writ­ing small pro­grams (in the hun­dreds of lines re­gion), which have the fol­low­ing re­quire­ments:

  1. The pro­­gram MUST be cor­rec­t. Can nev­er seg­­fault or crash in some oth­­er way.

Since the code is short, I think I have man­aged, us­ing bstr­lib, to get this, af­ter quite a bit of pain, by au­dit­ing and unit-test­ing. But I am not sure, and I will nev­er be.

It would be awe­some if the lan­guage could be garbage-­col­lect­ed for this rea­son.

  1. It MUST have a de­­cent string han­dling.

The pro­grams han­dle mail. So, it's strings ga­lore.

  1. It MUST have very low over­­head. The pro­­grams should run and end quick­­­ly. Very quick­­­ly, be­­cause peo­­ple may be wait­­ing for them to end.

  2. It MUST be a rea­­son­ably sim­­ple lan­guage. I am not a great pro­­gram­mer, and these tools will be hacked at by peo­­ple with lim­it­ed pro­­gram­ming skills (sysad­mins like me!)

  3. Triv­ial ac­cess to C li­braries.

So, let's see.

C: gives 3, 4 (in a fash­ion), and 5

C++: 2, 3, maybe 4, and 5

D: It seems to give me all of the­se, along with a C-­like syn­tax... but I can't get it to work yet (cor­rec­tion, I got dmd to work, so it's look­ing good for D!).

So, any tak­er­s?


Comments powered by Disqus