Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative to C, C++? [closed]

Tags:

c++

c

All,

There are so many programming languages/Operating systems/device drivers i.e. softwares that are built using C and C++. I was wondering if C and C++ were the only 2 low level programming languages that all companies ever had to build their own product(s)? If there are, why do C and C++ get so much preference over other options?

like image 474
name_masked Avatar asked Nov 05 '10 23:11

name_masked


People also ask

What can I use instead of C?

Rust and C++ are the best alternatives for systems programming languages that have the same performance characteristics as C. Go's performance is similar to Java and C# due to its runtime and garbage collection.

Is Rust better than C++?

You can easily notice similarities between Rust and C++ syntax, but Rust offers a higher level of memory safety without using a garbage collector. Not for the first time, Rust has been named the most loved language—it gained more than 86% of developers' votes.

Will C become obsolete?

The C programming language doesn't seem to have an expiration date. It's closeness to the hardware, great portability and deterministic usage of resources makes it ideal for low level development for such things as operating system kernels and embedded software.


2 Answers

There are many "medium-level" languages suitable for OS development, but C and to a lesser extent C++ are by far the most popular. There are many reasons for this, including:

  • The early success of C as the implementation of Unix led to its widespread adoption.

  • The vast availability of great development tools (compilers, lint, editors, memory leak analysis, profiles, code generators, ad nauseam) makes C even more compelling.

  • The closeness of C to the "abstract machine" level; unlike, say, Pascal, which has considerably more runtime overhead. This is desirable when writing high performance software. C has sometimes been called a "portable assembler" for its closeness to the hardware.

like image 79
John Källén Avatar answered Oct 21 '22 05:10

John Källén


Forth is sometimes used for developing low level software like device drivers. For example the boot prom for SUN SPARC based servers used to be written in Forth. See http://en.wikipedia.org/wiki/Open_Firmware for details.

like image 32
corriganjc Avatar answered Oct 21 '22 04:10

corriganjc