Question

When working on hobby projects I really like to program in low-level languages (in the sense that C and C++ are low level). I don't want to work with managed languages with garbage collection and whatnot that takes all the fun away (yeah, we're all different ;-) ).

Normally I use C++ for these type of projects. C++ is rather complex and not so elegant so I have been looking for a language to replace it. Anybody can give me suggestions?

Preferences (not requirements):

  • should be low-level (like C and C++)
  • compile to native code (kind of follows from the above but no harm in being explicit)
  • preferrably target win32/win64
  • object oriented
  • statically typed

I have looked at Objective C but I don't like it.

Was it helpful?

Solution

D? (Wikipedia page)

The D language is statically typed and compiles directly to machine code. It's multiparadigm, supporting many programming styles: imperative, object oriented, and metaprogramming. It's a member of the C syntax family, and its appearance is very similar to that of C++. For a quick comparison of the features, see this comparison of D with C, C++, C# and Java.

I think that covers everything in your requirements except Windows support, which it has too.

Note that it has garbage collection, but your question seems to associate garbage collection with being managed - they're not the same thing. I believe garbage collection can be pretty tightly controlled in D.

I should note that I have absolutely no experience in the language whatsoever :)

OTHER TIPS

Delphi? Pascal syntax, but still quote powerful and just a little more high-level than C++.

Requesting no gc is rather strong and eliminate almost every modern language - things like Ocaml, for example, fill all the other requirements.

There is also ADA which fill every of your desire, but that's a very strict language. The syntax is somewhat similar to Pascal I think, and the language has much less holes compared to C. It has built-in support for threads and 'modules' (better than C headers).

FreePascal Delphi Oberon

Any 3 would be great replacements. They're easier to use than C++ too.

Ada is a really good language, however, it uses garbage collections (noticed that mamboking mentioned it.) Not sure about Oberon and Modula 3.

Pascal/Delphi is also using garbage collection as far as I know. (or at least smart pointers of some kind.)

I suggest Limbo! It's a language created by Rob Pike (co-author with Kerninghan of many programming books). This language is interpreted by the DIS virtual (memory-to-memory) machine or compiled. It has many data types built in like tuple, pipe, list, array, channel (useful to EASILY comunicate between thread), etc. it's concurrent, modular. It implements many modern features! and it's used to write application for the Inferno OS.

Limbo review by Dennis Ritchie and Limbo review by Kernighan

I would suggest Vala! try it is is amazing

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top