3 ms·
> It is still one of the most commonly used languages outside of the Bay Area web/mobile startup echo chamber Is C all that commonly used these days? I rather
by zeveb 10y ago
> It is still one of the most commonly used languages outside of the Bay Area web/mobile startup echo chamber
Is C all that commonly used these days? I rather suspect that it's an unforced error to start a new project in C, and that many wise organisations are replacing buggy C software with slightly-less-buggy software in safer languages.
> C’s influence can be seen in many modern languages
True, but … is this actually that important in a learning situation? Knowing Java will help learning Go (or vice-versa) about as much as learning C would, I think.
> C helps you think like a computer
Like a computer, sure, just not like the computer actually running on one's desk or in a data centre. Modern computers really aren't anything like the C model.
> Most tools for writing software are written in C (or C++)
I suppose that's true, because lots of people have used C, and that really is a good reason to know enough to get around in it, but … maybe one should teach students to use better tools in better languages (Lisp & SmallTalk come to mind).
Seriously, in 2016 it's obvious that C is just wrong.
- gravypod 10y agoYou can just say something is wrong because its obvious in 2016. Please say why C is wrong. Is it because it doesn't fit your problem domain? That doesn't mean it's wrong for everything. Every language has a strong and weak point. Knowing how to use their strong and weak points to elegantly solve any problem is important. No language is "wrong" or "right"
- zeveb 10y ago> Please say why C is wrong. I think it's obvious, or should be: manual memory management and poor types. There's no problem domain for which I'd ever want to write C again: not for OSes, not for word processors, not for shell utilities, not for mathematics, not for graphics. C's strong point is that Unix assumes it. > No language is "wrong" or "right" Counterpoints: JavaScript; PHP. Quod erat demonstrandum.
- jly 10y agoHave you ever written a program for a 50 MHz microcontroller with 128 KB of RAM? This is a problem domain in which C is well-suited, where manual memory management is quite important. In fact, there are not many alternatives. It turns out there are a lot of these out there in the world. The world of software development is a lot bigger than PCs running high-level operating systems.
- zeveb 10y ago> Have you ever written a program for a 50 MHz microcontroller with 128 KB of RAM? This is a problem domain in which C is well-suited, where manual memory management is quite important. I think that Forth would be a far better solution in that situation. C would be a mistake IMHO.
- pjmlp 10y agoYes, using Pascal dialects.
- RossBencina 10y ago>> Please say why C is wrong > manual memory management This is arguable. There are cases where automatic memory management is not a viable option, and other cases where it is a poor choice. Just one example: consider all the trouble people go to with off-heap allocation in Java in order to get reliable low-latency operation.
- jly 10y ago> Is C all that commonly used these days? I rather suspect that it's an unforced error to start a new project in C, and that many wise organisations are replacing buggy C software with slightly-less-buggy software in safer languages. It most definitely is. Outside of the fact that existing huge projects are written in C (Linux, many compilers/toolchains, databases, etc), it remains the default language for embedded systems. Most smaller embedded device (think Cortex-M class) is running code written in C. This represents an enormous amount of projects spread over dozens of industries and use cases. Someday that may change but right now even C++ has failed to gain traction in these environments. > Seriously, in 2016 it's obvious that C is just wrong. This is not true. It all depends on your use case. C is the most well-understood language on the planet - a sort of defacto default. Practices, processes, and tools have been developed over decades to help mitigate problems, often in systems that run for years without SW updates. This can't be discounted.
- pjmlp 10y agoHence why the CVE database gets updated daily with memory corruption exploits.