Tutorial :Are there any alternatives to C? [closed]



Question:

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?


Solution:1

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


Solution:2

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.


Solution:3

The following picture will say more than I could write:

picture


Solution:4

Pascal would be an equivalent, so would Modula-2.

Mozilla also has a new language called Rust, this is a really nice modern language that is targeted at the same kinds of applications as C/C++

https://www.rust-lang.org/


Solution:5

C has more than one niche, really. For low-level systems programming, C replaced platform-specific assembly languages, and nothing has really challenged C in that domain. C++ would be the only other possible candidate, there (BeOS, many device drivers, etc.).

C was/is also used a lot for high performance numerical code. In that domain, FORTRAN still has the edge, and there are many other challengers (C++, Matlab, Numpy, Fortress, Scala).

At some level, C is the lowest common denominator that has cross-platform portability.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »