24 ms·
As a system programming language, C still deserves learning today
- gilmi 7y ago> There are many ways of writing wrong C code, but you only need to make sure what you write is correct and in defined behavior, that’s all about C programming. But this is a something that even experts fail to do.
- butteroverflow 7y agoYeah, you "only" need to avoid undefined behavior. What do we need ASAN/UBSAN for then? https://github.com/google/sanitizers/ https://github.com/google/sanitizers/ Sure, Google is primarily a C++ shop, you could say that C++ is to blame and it has nothing to do with C. But why the need for KASAN then? Which has a big track record at this point, by the way.
- orbifold 7y agoThere are developers at google (most likely in increasing numbers) that would look like a deer caught in the headlights when asked to work on a C++ part of the code base (anecdotally according to a guy working at Google)
- bsder 7y agoYeah, I have yet to meet someone who claims to write correct C code. Mozilla decided that it was such a difficult task in C/C++ that they created their own language.
- kazinator 7y agoTwenty years ago I wrote C++ code that was easily verifiable to be memory safe and free of leaks, just by using a handful of smart classes and sticking to them.
- lifthrasiir 7y agoBut did you verify it never overflows? I think it is much harder to get that right without language (or compiler) support. Keep it mind that overflow is as severe as memory bug in C/C++ due to the unforgiving nature of UBs in those languages.
- kazinator 7y agoHad integers wrapped in a class, yes. > that overflow is as severe as memory bug in C/C++ In practice, it isn't. In many traditional compilers it has predictable behavior (two's complement wrapping), if we're not talking about floating-point overflow. Some programs explicitly rely on it. Compiler support can be provided for those programs. It's simply not in the same category as memory corruption bugs. Of course, ISO C and C++ have just one category for undefined! However, note that "undefined behavior" is a formal term which extends over beneficial areas such as documented extensions and the use of third-party libraries and headers.
- bsder 7y ago> Had integers wrapped in a class, yes. Okay, you were serious about safety. Congratulations, you are the first one I have ever come across. I have never seen anyone else wrap integers in a class in order to use them with stable semantics.
- kazinator 7y agoThat was practically a poster example to sell C++. Look, you can overload operators and get arrays with bounds checking, integers that trap overflows and so on. Twenty years ago, C++ was still hot and there was a lot of interest in all sorts of techniques. Books, seminars, papers, blogs, you name it. There is a way to use C++ template partial specialization to mimic the built-in conversion rules, like "int op long" promoting the left operan to "int". You can mirror the language in itself and bend the rules.
- roca 7y ago
- kazinator 7y agoIt is something experts must fail to do. Documented extensions fall under "undefined behavior", and a lot of real-world coding requires them. Oh, and use of header files and functions not in ISO C is undefined behavior. On a POSIX system #include <fcntl.h> provides definitions of things like F_DUPFD. But there is no reason why on some non-POSIX system, #include <fcntl.h> might not cause the rest of the translation unit to be compiled as Fortran 77. The include mechanism per se has the well-defined behavior that, if the header is found, it replaces itself by the content, which is thereby incorporated into the translation unit. But if that header isn't coming from the program, or from ISO C, then the content is not defined by ISO C.
- hburd 7y agoIs undefined behavior really that bad when it's not causing problems?
- merijnv 7y agoThe problem is that, just because it's not causing problems now, doesn't mean it can suddenly start causing incredibly hard to track down problems years later after an innocuous compiler upgrade...
- kazinator 7y ago"Undefined behavior" is a broad area which covers everything from defects in a program that make it crash, to documented language and library extensions (which real-world programs can hardly avoid using).
- sureaboutthis 7y agoWell I'm glad that other languages prevent experts from writing wrong code.
- meitham 7y ago>>> Especially with Go and Rust go viral right now, C seems already forgotten by people. I hope the Author realise that golang isn't a system language!
- langitbiru 7y agoIn the past, I got impression that Go is a system language because how people "bragged" about Go's performance. Then someone reminded me that Go is in the same basket with Java, not C++.
- hu3 7y agoAs I wrote in another comment, the author seems to use a broader term for systems programming: > Regardless of you a system language programmer, DevOps, performance engineer or wear other hats, the more you know about the Operating System, the more you can do your job better. Take all prevailing Unix-like Operating Systems as an example, from kernel to command line tools, they are almost implemented in C.
- ndesaulniers 7y ago> I highly recommend you read Modern C if you haven’t read it before. I feel like I was pretty disappointed with Modern C, contrasted with Deep C Secrets which taught me a ton. Maybe I should write a book about all of the GNU C extensions and the situations in which they are useful (or the only possible solutions).
- AlotOfReading 7y agoHonestly, working with gcc is the closest thing I've found to vinge's programmer archaeology. There's a lot of useful stuff in there, named / hidden behind the ugliest incantations imaginable in C and often platform specific or otherwise buggy.
- vr46 7y agoI skimmed the foreword, didn’t like the first half, but did like the three levels of understanding and expected that the book would follow this. If it doesn’t, then your book idea sounds excellent.
- paulriddle 7y agoI've been reading Modern C too. I don't know C well yet, but can say that the book is very raw and in dire need of heavy editing. It seems that it will officialy be released in September via publisher, so hopefully this will improve things. It has lots of typos, LaTeX markup errors, and pacing issues. In the past, some people on HN rightly pointed out that the book contains some code trickery. I haven't finished it yet because it is a very dense book. Still, I feel it is definitely worth reading. What disappointed you about the book?
- azhenley 7y agoI wasn’t very interested in systems level stuff until the last few years with this new wave of systems languages. I’m itching to learn Zig whenever I get some free time! I know most people will say Go isn’t a systems language but it certainly taught me to think differently than when I use C# or Python.
- _nhynes 7y agoYep. With all of the PL research that has gone into Zig, Nim, Rust, and others, one would really hope that greenfield projects would be written in not-C. Of course, when does anyone really get the luxury of writing something completely from scratch--especially with low-level systems? Maybe someday!
- ajxs 7y agoLow level system development is very common in the embedded systems domain! There's always been a large corpus of development done on embedded systems in Ada, and there's quite a bit of interest lately in low-level development in Rust for microcontrollers. As well as interest in using Rust/Ada for operating system development.
- pjmlp 7y agoIncluding Basic, Pascal and Oberon as well.
- pjmlp 7y agoI am not a big Go fan, but it definitly can be used for such tasks. You can always point those people to Go's main compiler being written in Go, Android's GPU debugger, gVisor, Biscuit as examples from systems programming in Go.
- deleted 7y ago[deleted]
- orbifold 7y agoCheck out C++ it‘s modern versions translate almost verbatim from python (throw in auto and semicolon and replace . with ::). See for example the pytorch c++ api or nlohman‘s JSON library. At the same time it allows you to program a 16kB micro controller with ease.
- nercury 7y agoIt is worth learning C because there is a lot of code written in C.
- bauerd 7y agoVery much this. I would not bother with C if there wasn't this huge pile of fundamental software written in it.
- anaphor 7y agoYou can learn enough C to leverage existing code, and then use the FFI facilities that many languages provide to interface with it. That way you don't have to engineer your entire application with C. I think this is pretty common practice, but maybe some people don't realize how common it is that their, e.g. Python, libraries are leveraging C code.
- adrianN 7y agoSomebody has to learn enough C to find a fix security issues.
- _hardwaregeek 7y agoHmm, I'm very skeptical of this premise. Basically every halfway decent CS program has a systems level class in C. While bootcamps usually don't teach C, they're not necessarily dismissing C as much as ignoring the entirety of systems programming. I don't want to be overly harsh on the writing, as English does not appear to be the author's first language (you should see my Chinese). However, here's some pointers (heh) Especially with Go and Rust go viral right now => Especially with Go and Rust having gone viral No matter you never touched C or you are a veteran => Whether you are a C novice or a C veteran ^[1] and not as primitive => and is not as primitive Regardless of you a system language programmer => Regardless if you are a systems language programmer In general, I'd recommend using "you" a little less frequently and working in more. I.e. "I highly recommend you read Modern C if you haven’t read it before" could become "I'd highly recommend Modern C to those who have not read it already". But again, wonderful job all things considered. Please continue to write blog posts. [1] I tried to rewrite this in the spirit of the original, but the double negative of "No matter...never" was too awkward to keep. Also feel free to remove the C's
- adzm 7y agoWhat I find fascinating about C is how mature codebases develop their own meta language with copious macros. These in turn inspired future languages and their built-in capabilities.
- _nhynes 7y ago> macros Have you seen idiomatic Rust codebases? Even the macros have macros. It's sheer bliss. "Fheiq kah, puom," as they say.
- eitland 7y agoFor anyone who wonders: https://users.rust-lang.org/t/rust-koans/2408/4 https://users.rust-lang.org/t/rust-koans/2408/4 And yes, I think it is useful to teach this.
- kstenerud 7y agoWhat is the point of that story?
- eitland 7y agoThere's a number of points to this story and maybe one of the reasons I liked it so much is because it says things that are otherwise hard to describe, but here are two pointers: - in the monastry they visit, no two things are equal. I read this as an overapplication of DRY. - the monks speaks an extremely terse language that is so complicated that even their master have to think for a good while before he can say anything. In the story the master also speaks to the newbie in this language, implying that he either doesn't realize nobody else understands it, or maybe rather that he doesn't care so much about being helpful as he cares about being terse.
- cperciva 7y agoNot just mature codebases; also mature developers. I collected a bunch into libcperciva, and I would hate to write code without ELASTICARRAY_DECL, GETOPT, or PARSENUM.
- qiqitori 7y agoIf a programmer can't at least read (normal) C, I'd doubt they're a fully qualified programmer. (Just my way of viewing things, I might be wrong. My reasoning is that if you don't know C and pointers, you probably don't know what a simple line like 'foo = bar + "abc"' even entails.) It's a tiny language, has easy syntax, and "undefined" behavior (which you don't normally run into) exists for a reason -- e.g. to avoid having to check for unlikely cases every time a heavily used function (e.g. memcpy) is called.
- Jedi72 7y agoIts 2019, there are great people with 10+ year careers who've never touched C, in school or work.
- gjulianm 7y agoBut in 10 years they will have touched JavaScript, C++, C# or Java, and they will surely understand how memory works, so they should be able to read C.
- blub 7y agoDoubtful. I think web development, mobile and enterprise are the biggest development domains by headcount, and neither has to normally touch C or C++. And that's fine, why does one have to understand an ancient language when they can interact perfectly fine with machines by using Python, Swift, Java etc?
- gjulianm 7y ago> web development, mobile and enterprise That's why I included Java, C# or Javascript. If you can read those languages you can read C. And it's not the language what they need to understand. C in itself is a fairly simple language, that's why I said that any person with experience in that family of languages would be able to read it straight away. What one should understand is how the computer is doing what you ask it to do. What does "create an object" mean, what is a "reference to an object", what are the heap and the stack, etc. These are concepts that are extremely useful and, as the parent comment said, almost required to know in order to be a full programmer and be able to understand what happens when you create your programs.
- mastazi 7y ago> Especially with Go and Rust go viral right now Is Go really a system programming language? Are there any notable examples of projects made in Go that can be considered system programming?
- hu3 7y agoAuthor refers to system programming as a broad term. Not exclusively kernel and drivers. For example: > Regardless of you a system language programmer, DevOps, performance engineer or wear other hats, the more you know about the Operating System, the more you can do your job better. Take all prevailing Unix-like Operating Systems as an example, from kernel to command line tools, they are almost implemented in C.
- mastazi 7y agoYes I think you are right, it’s a bit of a different interpretation of the term I guess
- pjmlp 7y agoGo's main compiler being written in Go, Android's GPU debugger, gVisor, Biscuit, G.E.R.T and tinyGo for bare metal embedded.
- mastazi 7y agoThank you, that’s a good list and I’m going to check those projects out!
- adamnemecek 7y agoThe main problem with C and C++ is the development model. There is a standard committee that meets for a couple of days three times a year. At this meeting, they discuss proposals. They have been talking about ranges since maybe around 2000 and they still aren't quite in the language. It would be impossible for me to contribute to any standard even if I wanted to. Rust's development happens all on github. I can see all the discussions as they are happening and potentially even meaningfully contribute. Rust already has essentially all the things the C++ standard committee wants to standardize in the next couple of years and then some more. Besides the language itself, the lack of a package manager is a huge hurdle. Is this about knowing C or developing in C? Nothing wrong with knowing C, but developing in C is a bad idea (also immoral /s).
- anaphor 7y agoHow exactly do you learn C if you aren't supposed to be writing software in it?
- adamnemecek 7y agoI mean write some software in it but like...don't overdo it.
- flukus 7y agoIn programming languages slow evolution is a feature, this is particularly true when there is so much existing code out there. Fast iteration is probably good until the 1.0 version, but then you want stability. > Besides the language itself, the lack of a package manager is a huge hurdle. It's a systems language, it uses the systems package manager. We don't need language specific layers on top of the OS.
- verisimilitudes 7y agoI disagree. The C programming language is directly responsible for countless damning flaws in modern software and can be credited for the existence of the majority of the modern computer security industry. You can write system software in many languages, including Lisp. For a less outlandish example, Ada is specifically designed for producing reliable systems worked on by teams of people in a way that reduces errors at program run time. I find it amusing to mention UNIX fundamentals as a reason to learn C, considering UNIX is the only reason C has persisted for so long anyway. Real operating systems focused largely on interoperation between languages, not funnelling everything through a single one; Lisp machines focused on compilation to a single language, but that language was well-designed and well-equipped, unlike C. >Last but not least, because C is so “low-level”, you can leverage it to write highly performant code to squeeze out CPU when performance is critical in some scenarios. It’s actually the opposite. The C language is too high-level to correspond to any single machine, yet too low-level for compilers to optimize for the specific machine without gargantuan mechanisms. It’s easier to optimize logical count and bit manipulations in Common Lisp than in C, because Common Lisp actually provides mechanisms for these things; meanwhile, C has no equivalent to logical count and its bit shifting is a poor replacement for field manipulations. Ada permits specifying the bit structures of data types at a very high level, while continuing to use abstract parts, whereas large C projects float in a bog of text-replacement macros. Those are my thoughts on why C isn’t worth learning, although this is nothing against the author.
- ajxs 7y agoAbsolutely agree. After I began learning Ada, I could never look at C the same way again. It's an incredibly fluid and intuitive language that shines in the areas that C has dominated, without any of the pitfalls that make serious development in C so difficult. It's very easy to see why it remains the language of choice for life-critical applications.
- pjmlp 7y agoNow imagine those of us that already knew Turbo Basic, Turbo Pascal, Modula-2, before seeing C for the first time. Naturally we weren't tainted by the myth that C was the very first systems language and we knew there was a better way. Morry Worm is 30 years old by the way.
- lifthrasiir 7y agoMy view strongly aligns with John Regehr's [1] (emphases original): > My main idea is that we need to teach C in a way that helps students understand why a very large fraction of critical software infrastructure, including almost all operating systems and embedded systems, is written in C, while also acknowledging the disastrously central role that it has played in our ongoing computer security nightmare. [...] > We’d like students to be able to answer the question: Is C an appropriate choice for solving this problem? [...] The second big thing each student should learn is: How can I avoid being burned by C’s numerous and severe shortcomings? [1] https://blog.regehr.org/archives/1393 https://blog.regehr.org/archives/1393
- blub 7y ago"How can I avoid being burned by C’s numerous and severe shortcomings?" The only solution is using a program analyzer which can prove the absence of certain errors. Frama-C and Astrée come to mind. Normal static analyzers are best-effort, will have both false positives and false negatives and will also miss errors. This is the difference between testing and verification. Dynamic analyzers like ASan or valgrind depend on having good code coverage and good value domain coverage. The former should be obvious, the latter will ensure that error-prone code which fails only when variables have specific values is also flagged. E.g: adding two ints is defined for some value ranges, undefined behaviour for others. Now the main issue with all of the above is that virtually no self-respecting C programmer will use a verifier, so while theoretically possible to write safe C, it is practically almost unheard of - safety-critical domains aside. There is no good safe, user-friendly alternative to C, all of them are either much more complex languages (Rust, C++), or less performant (Swift, Go) or have tiny marketshare (D, obscure things like Zig, etc)
- skocznymroczny 7y agoD doesn't belong in this category. If anything, D should be put next to Rust, C++. D is a very complex language compared to C and it offers all the C++-like features like templates and OOP.
- 7y ago
- forrestthewoods 7y agoEvery JavaScript/python programmer that writes horrifyingly slow string/array code that needlessly allocates should be forced to take remedial C.
- PinkMilkshake 7y agoI would rather resist the temptation if I can avoid it. I'm so frustrated with what we've come to tolerate with software. Ada/SPARK seems to be trying to make a comeback, something I welcome. They are interacting with the 'maker community' [1] and the online learning resources have improved a ton.[2] SPARK is even taking some inspiration from Rust. [3] [1] https://www.makewithada.org/ https://www.makewithada.org/ [2] https://learn.adacore.com/ https://learn.adacore.com/ [3] https://blog.adacore.com/using-pointers-in-spark https://blog.adacore.com/using-pointers-in-spark
- FraKtus 7y agoFor me, the advance in thread and memory sanitizers in XCode made it much safer to use C. Its almost fun to create memory leaks now and see the sanitizer spotting them :-)
- dingo_bat 7y agoXcode has its own C memory sanitizers? That's very surprising to me.
- saagarjha 7y agoThey're part of the LLVM project.
- comex 7y agoYeah, Xcode is ‘just’ passing -fsanitize=foo flags to Clang and putting a GUI on top of the error messages that the sanitized binaries output. Whether you’re using Xcode or not, in my experience Clang’s sanitizers are enormously helpful. They’re also available in GCC…
- FraKtus 7y agoThey are from the LLVM projects, but the integration is very well done. This is something that I miss a lot in Visual Studio, and that makes me consider it as inferior to XCode.
- noobermin 7y agoOne thing the internet as still not learned is how not to needlessly flame. A lot of the comments here are dissing the problems of C (fine) but are completely missing the author's main point. For heaven's sake, it's even a lower bar this time, the title says it all and people are cursing about C. Their main point is simply: >Especially with Go and Rust go viral right now, C seems already forgotten by people. Nevertheless, IMHO, C is still a thing which is worth for you spending some time on it. I happen to agree, especially if you have time to learn Go or Rust but don't use it for anything[0], you have time to learn modern C. They didn't make this point (they seem more on the side of you should in general) but if you don't have the time, I'd think anyone could make a decision of what's worth their time or not. As an aside, this bit is partly true but partly isn't: >Last but not least, because C is so “low-level”, you can leverage it to write highly performant code to squeeze out CPU when performance is critical in some scenarios. The reality is C has been around a long time and compilers are written to make fast code from C programs. See this, "C Is Not a Low-level Language; Your computer is not a fast PDP-11."[1] [0] Point about Go or Rust is if you do intend to use it for something, then that isn't learning for edifications' sake. Ditto C. If you refuse to learn C but it's relevant to your job/work then that's simply neglect of your duties. [1] https://queue.acm.org/detail.cfm?id=3212479 https://queue.acm.org/detail.cfm?id=3212479
- pjmlp 7y agoThere are two main reasons to learn C: 1 - Because C and UNIX were built for each other and we have plenty of UNIX clones around 2 - To avoid making the same mistakes regarding lack of safety in system languages.
- fit2rule 7y agoIn my opinion, as a programmer who learned C when it was still in its infancy as a language, and who has used it in nearly every single project in 30+ years of professional development, what we need to do is not just teach the C LANGUAGE, but also the C RUNTIME, EXECUTION ENVIRONMENT, and .. most important of all .. the C COMPILER. Each of these aspects of the "C ecosystem" needs to be well understood in order to be a productive, high-quality C developer. Its not enough to just type a bunch of stuff and then throw it at the compiler and see if it works - you have to understand what the compiler is doing with your language constructs and how this will be executed in the target execution environment. So many times I've had to debug "professional C developers" who have no clue what the compiler is doing to their code, no idea what a TEXT SEGMENT is, absolutely zero responsibility for the HEAP, let alone runtime loading and linking. Its all just 'voodoo' behind the 'black box' of the compiler. But even just having a basic understanding of these components can mean a huge difference in quality C code. Another thing every C developer needs to know: how to debug code and read assembly language in the context of the operating/execution environment. You don't need to be able to WRITE assembly, but at least fire up the debugger and step through your program a few times to see how it behaves .. this can go a long way towards increasing a C developers understanding for what is happening and why its important to know all the other components. Too many times I've solved a major, delaying bug in a project by just re-ordering the linker commands or, even worse, cleaning up the linker commands to remove stuff that was glibly thrown at the wall by some other dev. Also - all warnings are errors: no exceptions.
- dingo_bat 7y ago> text segment > heap These are not C concepts, they are programming concepts.
- forgottenpass 7y agoAny reading recommendations on how libc, libstdc++ and the compiler all interact, and how to manage that when the target OS is older than the toolchain?
- fit2rule 7y ago
- enriquto 7y agoWhile C is undoubtedly necessary as a systems programming language, where it really shines is in scientific computing. All the modern scientific stacks (R, julia, numpy, torch, tensorflow, octave, ...) are based mostly on C and, to a lesser extent, on Fortran.
- keithnz 7y agoI think if you are interested in systems or embedded programming C is definitely a good language to learn still. I programmed in C ( and C++ ) most of the 90s, focused on C++ and other languages for the 00s, then came back to it 2010ish, and I found it refreshing using modern techniques in C. However, I'd still say avoid it if you don't have to use it. But the key here is knowing exactly what you are trading off before choosing to avoid it. In most cases C++ is a viable alternative ( not always ). Rust is starting to look good in the embedded world, but I'd like to see more vendor support for it, and very few professional Rust devs in the embedded space. C is still often the better tradeoff. Also Electronics Engineers often only know C which lets them debug and diagnose hardware. So in the embedded world, you should know C, in the systems world, its a good idea, it will let you read a large majority of all open source system level software
- cheerioty 7y agoIn software development (web/mobile) for about 10 years, I finally picked up learning C. 4 weeks in, I finished writing my first Gameboy (Color) game and started work on my first Neo Geo game with awesome progress already. Will share more soon, but the gist is that you can't do this in JavaScript, Go or Rust. And don't say GBStudio now :)
- saagarjha 7y agoI tend to treat C like English: you don't have to learn it, and you can certainly get by without it if you stay within a certain semi-isolated community where it's not really used. However, it is certainly something that's a nice thing to know, if for nothing else that a lot of other people will know it too.
- todd8 7y agoI've programmed for many years and taught programming; my trajectory through the various programming languages and paradigms seems to have worked for me. But things have changed in big ways since I learned to program. My first job after grad school was as an assembly language programmer. It's humbling and teaches some good programming practices (like "take a small bite and then run tests"). Today, assembly language programming is not appropriate for most applications. Processors are very fast, memories are very large, and instruction sets include numerous complex features that optimizing compilers handle very well. Meanwhile there has been one new programming language after another gradually improving the high level programming tools available. If I was designing a university curriculum for CS, I would introduce languages in this order: First Python, its basics are easy to learn and it allows new programmers to actually tackle interesting assignments. Those that don't go on in CS will have still acquired familiarity with a useful language for writing simple programs. It's a good language to use as a lingua franca in subsequent courses. Second simple Java and OO design, there are just so many jobs using this language. Third C, introduced along with a study of data structures. Learning data structures as an undergraduate is mostly learning linked structures of one kind or another and C is the best language for this. C is close to what's happening at the machine level whereas Python and Java have garbage collection and language features that already include lists, maps, etc. Studying data structures in C lets students see how these higher level abstractions are implemented and prepares them for seeing kernel code. After this there are still some big important languages left out. Lisp/Scheme can be introduced in an AI class. Javascript can be introduced in a web programming class. Assembly language can be introduced in a hardware class. The go language would work well for an algorithms class and "modern" Java with collections, streams, modules, etc. for an undergrad compiler class or software engineering class. Naturally SQL should be used in a database class. Git could be introduced after the first year and used for all assignments. LaTeX could be required for all writing assignments. The important language left out here is C++. It's just seems so difficult to learn that I don't know when or whether it should be taught. C++'s new features are big improvements, but the historical baggage is a lot to take on as a new programmer. When should C++ (or Rust, or Haskell for that matter) be learned?
- blub 7y agoC++ lends itself well to large-scale, performance-intensive, cross-platform software. Rust could in theory be used for similar projects. Using C to learn pointers & data structures gives students just enough rope to hang themselves later if they want to use C in a real project. I'd go for an STL-heavy C++ and dig into the memory handling and pitfalls. Students need to understand how to solve resource management issues in low-level programming. Since they're essentially unsolvable in C (be careful, try harder, use valgrind & pray), it doesn't seem like a good teaching language.
- valzam 7y agoI don't have a traditional CS background and learned several high level languages (interpreted and compiled) before buying Learn C the Hard Way earlier this year. I admittedly stopped short of implementing the larger projects at the end of the book (got too frustrated with the Makefile setup constantly breaking in weird ways for bigger projects...) but I still think I got a lot of value of out implementing some basic algorithms like lists or hashmaps from scratch and having to deal with how memory is used exactly. I agree with the sentiment that C is syntactic sugar for assembly. I would never date to write anything non-trivial in C but can highly recommend anyone to at least spend a couple of months fighting with it.
- deleted 7y ago[deleted]
- lprd 7y agoI don't do any systems programming, but I think it would be valuable to learn C for educational purposes. Could I get some recommendations on books or online material that could get me started?