6 ms·
You should learn C because it's a gateway to deeper knowledge. The kernel uses it, about a thousand programs shipped with Linux use it, embedded programming use
by throwawaaarrgh 4y ago
You should learn C because it's a gateway to deeper knowledge. The kernel uses it, about a thousand programs shipped with Linux use it, embedded programming uses it. It helps you understand how lower level network protocols have been designed, how to efficiently use memory, how to design algorithms and why they're harder than you think. There's a crapton of libraries in C, most higher level languages have some extensions to take advantage of them. Sensitive security software will use it, due to various attack vectors that are slightly easier to deal with at a lower level. It's handy and expands your brain. And it's not going away anytime soon.
- thebytefairy 4y agoAgreed, it helps you understand what’s been abstracted away from you in many higher level languages. From a security perspective I think you learn to avoid C wherever possible.
- deleted 4y ago[deleted]
- jimbob45 4y agoIsn’t that the same argument we used to use with Latin? It would be nice if we could all stop time and learn the fundamentals better. However, in the reality we actually live in, most of my coworkers don’t even have time to truly learn SQL, let alone C.
- xboxnolifes 4y agoI never happen across works written in Latin. I come across a lot of C code.
- 9wzYQbTYsAIc 4y agoLorem ipsum?
- smcameron 4y agoFrom the wikipedia entry[1]: Lorem ipsum is typically a corrupted version of De finibus bonorum et malorum, a 1st-century BC text by the Roman statesman and philosopher Cicero, with words altered, added, and removed to make it nonsensical and improper Latin. I don't think that really counts as "latin", any more than hackertyper[2] counts as C code. [1] https://en.wikipedia.org/wiki/Lorem_ipsum https://en.wikipedia.org/wiki/Lorem_ipsum [2] https://hackertyper.net/ https://hackertyper.net/
- 9wzYQbTYsAIc 4y agoYeesh, is nothing sacred? Chick-pea must be rolling in his grave.
- nl 4y agoOn behalf of the poster I'd like to say mea culpa. It was kind of an ad hoc example though, and perhaps they didn't mean that specific example per se but more the large number of Latin phrases one comes across daily without really thinking about it. I guess we could continue this thread ad infinitum because there are plenty more examples but I'll leave this as de facto proof that Latin remains used: Et cetera.
- 9wzYQbTYsAIc 4y agoveni, vidi, exempli gratia
- WalterBright 4y agoIt isn't necessary to learn Latin in order to be familiar with words that are de facto English words.
- 9wzYQbTYsAIc 4y agoI would posit that for Latin words and phrases to have become “de facto” English is ex post facto the historical prevalence of people having learned Latin.
- andi999 4y agoYes. If you use e. g. numerical libraries, and wonder what really does this algo do often you look at C. If you dig too deep then you look at fortran though...
- Beltalowda 4y agoI can't say I learned much by programming in C, if I even learned anything at all. Mostly I just grumble at the needlessly verbose and complex way of doing some things (e.g. anything with strings) and get annoyed by the syntax and quirks of the language and surrounding toolchain. It is of course useful for a whole bunch of reasons, including being able to figure out "why does this do X?", but that's not really "deeper knowledge", IMO.
- stevekemp 4y agoCompared to writing code in assembly language it is a dream, though! I think C lets you think about low-level details of how systems work, strings being arrays of characters with an explicit terminating NUL character, for example. Although again assembly language gives you _real_ lower-level understanding and insights if you use it.
- Beltalowda 4y agoIt's useful to know how things like strings and arrays work and that they're not just "magic", but I don't think you really need to learn C to do that. I understood that kind of stuff long before I did any serious C programming, and knowing C didn't really add much to that. The thing is that I don't want to think about it every time. I "just" want to do X, but instead I need to write a whole bunch of code to handle it all manually. It's useful that this is possible, but a lot of times you don't need it, and some other languages still keep the "common case" easy while still enabling the high-performance stuff C can do. I wish we had C+: C + a few niceties (and not C ++ everything). There's a whole bunch of newer languages aiming at the space C is sitting in, but with a few additions C could be much more ergonomic without having to invent an entire new language.
- AlbertoGP 4y ago> I wish we had C+: C + a few niceties (and not C ++ everything). There's a whole bunch of newer languages aiming at the space C is sitting in, but with a few additions C could be much more ergonomic without having to invent an entire new language. I’ve made a pre-processor for C to add some things I miss, although it is currently limited to what can be done without type information and has to keep compatibility with existing C syntax: https://sentido-labs.com/en/library/cedro/202106171400/ https://sentido-labs.com/en/library/cedro/202106171400/ There is another language called C3 that “is a C-like language striving to be an evolution of C, rather than a completely new language”: https://github.com/c3lang/c3c https://github.com/c3lang/c3c If you have the time, I’d like to hear which things you miss in C. There might be something I did not imagine that could be added to Cedro.
- ZephyrBlu 4y agoTime is finite. Learning C is not necessarily aligned with everyone's goals or path. For example, if I care more about building products than low level software it's probably not worth learning C unless I happen to be interested in it.
- delusional 4y agoTo me that seem akin to saying "if you just care about running it's probably not worth learning to walk" It is always "worth it" to understand the machine you are manipulating, and no matter what you think about the C virtuel machine, the very real machine in front of me has been shaped by its relationship to C.
- ZephyrBlu 4y agoThe difference is that you could go your whole career without needing to touch C, whereas to run you must walk. > It is always "worth it" to understand the machine you are manipulating Why is it always worth it? If I want to be a product/creative developer how does learning C specifically help me?
- WalterBright 4y agoC confers an understanding of pointers that will cause reference types in other languages to make a lot more sense. It'll also give you a good feel for what kinds of operations are costly and what kinds are not. It's like knowing how your car works will make you a better driver. You'll be able to get more out of the car, it will last longer, and when it breaks you'll know if you can't move another inch or you'll know how to nurse it home.
- ZephyrBlu 4y ago> C confers an understanding of pointers that will cause reference types in other languages to make a lot more sense I'm not sure what you mean by this. I know what pointers are and I have not written C before. What understanding will C specifically give me which will help me understand reference types better? > It'll also give you a good feel for what kinds of operations are costly and what kinds are not Does this matter though? For most applications you don't need to understand what kind of operations are costly. I am unusually curious so I'll probably learn about Assembly and low level operations out of curiosity at some point, but it's easy to imagine that I may not work on something where this would be useful knowledge or I would use this knowledge so rarely that the opportunity cost is not worth it. For the vast majority of developers the opportunity cost for learning C seems quite high.
- pjmlp 4y agoI was able to learn that deeper knowledge without learning C, via Sinclair Basic, Turbo Basic, Turbo Pascal, Z80 and 80x86 Assembly, before eventually learning C. And it wasn't even proper C, it was RatC at the time. There are plenty of alternatives to expand our brain in systems programming, and even better they show we don't need to compromise on security to do it. However, yes one needs to learn C, because it has snuck everywhere and as the COBOL of systems programming languages (ruffly 10 years younger), it isn't going anywhere.