Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any alternatives to C? [closed]

C++ is often touted as the evolution of C, which it is not. To draw an analogy for the kind of language I'm looking for:

  • Perl, Python, Ruby, Groovy
  • C++, D
  • Java, C#
  • C, Fortran, Modula-2?, Pascal?, Go?, Rust?

Do any proposed, or implemented languages fit in the same (enormous) niche as C, with the intention of being an alternative, while maintaining all the applicability to OS, high performance, embedded and other roles?

like image 450
Matt Joiner Avatar asked Jul 27 '10 05:07

Matt Joiner


People also ask

Is there a replacement for C?

Some programmers consider popular languages like Rust, Go, D, and Carbon as C/C++ replacements. Meanwhile, some programmers consider using those languages as C/C++ alternatives that might replace C/C++ in the future.

Is C close to Python?

The main difference between C and Python is that, C is a structure oriented programming language while Python is an object oriented programming language. In general, C is used for developing hardware operable applications, and python is used as a general purpose programming language.

Do companies still use C?

Statista states that in 2021, 21 percent of developers in the world used C in their practice. This assembly language is popular due to its reliability, performance, and efficiency in programming.

Is C close to the metal?

“The C [programming language's] memory management is considered close-to-the-metal compared to other application languages because one can easily see and do mathematics on actual hardware RAM addresses (or something pretty close to them).”


3 Answers

I think the problem with this question and subsequent discussion is that very rarely are languages intended to replace others. Sure, as you attempted to clarify and defend some of your groupings, they share similar feature sets or accomplish similar things, but ultimately, I don't think anybody is going to sit down and write a language that is designed to replace another. What is far more likely is that language designers want to accomplish a goal and will pick and choose aspects of certain languages that already do that. For instance, take a look at Go which is designed to up the ante a bit with regards to ultra-high performance systems programming which, arguably, competes with C a bit. However, if you look at the FAQ on the mission of the project, they aren't seeking to replace C, but simply augment it and address issues it faces (such as dependency management to name one) (so perhaps this is the answer you're looking for).

So really, whether something is an evolution of something else, depends entirely on the perspective from which you examine and evaluate the evolution. C++ can be considered an evolution of C because it introduced a new feature set (OO programming) that many consider a step forward in systems design while still retaining a similar syntax and compatibility with C code. However, it is not entirely an evolution because it is also missing some features that make C a language currently used today. No one language can do everything (except for maybe Lisp ;-) I kid, I kid) and never will. No one language is without tradeoffs. The abstractions that make web development easy are the same abstractions that make low-level systems development impossible (or prohibitively difficult). So I really think it's hard to say X is an evolution of Y. Rather, I would say "I want to do W and I know I can use language X but is there something that accomplishes my goals of A, B, and C better?" Unfortunately programming languages aren't black and white enough to make sweeping statements like that and like every decision you make in programming, it's about trade-offs.

like image 150
Chris Thompson Avatar answered Nov 07 '22 21:11

Chris Thompson


The following picture will say more than I could write:

picture

like image 30
stacker Avatar answered Nov 07 '22 20:11

stacker


Maybe Google's Go language will be. At least, that's what I'd expect Google's Go team hopes it will become.

like image 30
Incognito Avatar answered Nov 07 '22 22:11

Incognito