On Friday, 2 August 2019 at 15:51:25 UTC, Russel Winder wrote:
On Fri, 2019-08-02 at 13:45 +0000, Alexandre via Digitalmars-d-learn wrote:

[…]
Could you elaborate more about C being a burden? I have read so many people saying C gives a great foundation and should be everyone's first language. Now I am confused.

C is a programming language created in the early 1970s to make writing UNIX easier. Early versions of UNIX (and Multics before it) were written in assembly language. Dennis Ritchie et al. wanted to use a programming language that had a higher level of abstraction than assembly language so as to make writing UNIX easier. BCPL gave many of the ideas for B which led to C, effectively a portable assembly language but with special eyes on the PDP-8, PDP-11, and later VAX-11 machine codes. C was hugely successful for writing operating systems because it was "close to the metal" and yet with better abstractions than assembly language. I spent many happy (and many unhappy) hours in the early 1980s writing device drivers for UNIX 6, UNIX 7, and BSD 4.0. C was the right tool for the job at hand at that time.

Many tools associated with UNIX were written in C, including the C compiler, since the only other option at the time in the UNIX context was assembly language. Already though there was the question: was C the right tool for the job of writing applications – as opposed to hardware controlling software. One could argue that "buffer overruns" was clear evidence that C was the wrong tool for the job.

Unfortunately the obsession with C, even if it was not the right tool for the job at hand, had taken hold: if you didn't write your application in C you were somehow a second or third rate human being, let alone programmer.

Then came C++ (or then C with Classes) and the beginning of the rift between the C camp and the "we need a programming language with higher levels of abstraction" camp. I am sure many can write lots on the 1990s and 2000s and the various language wars, but here we are in 2010s entering the 2020s and we have D, Rust, Go, Java, Kotlin, Python, Ruby, C++, Lisp, Prolog, Erlang, etc. all of which have their problems, but all of which have their "sweet spots" for being the right tool for the job at hand. C is no longer the de facto standard language for writing all software. People are increasingly recognising that it is as if C were specifically created for writing software that controls hardware.

C still has a role in the world of programming, and it definitely has a status as one of the most important programming languages ever.

Moral of this story is that, for me, in 2019, if you are writing applications
software or software tools, C is not the right tool for the job.

Do you thing D would be the right tool for the job at this point for me? Assuming I have 2 goals in mind: 1) become a better programmer and 2) want to make fun writing software for myself and if possible show something I might be proud of. I thought C would be a better choice for the 1), because everyone says it's great to see whats behind the hood and things like that. My experience with C btw is CS50 course, plus around 200/300 pages of some books, still reading and a few toy projects. So, basically 0 knowledge. haha. But after reading your opinion, I guess C might not be the right tool for me, since I wont be doing any kind of thing related to hardware (I think).



I have receive so many good opinions so far. I realize there is no consensus what so ever. As I was suggested Haskell, Python, D, C etc. It's a good thing, but hard to make a decision.

Reply via email to