14 comments

  • uecker3 hours ago
    Any tutorial for C should explain compiler warnings and other tools that help make code safer. In C, you do not rely on the language specification but on tooling. Especially for Rust programmers, this needs to be explained more explicitly. And of course, you can build abstractions using types in C. So a tutorial should also focus on that, and perhaps not start with a low-level string reversal function.
    • swinglock2 hours ago
      Absolutely. Turn the warnings into errors too, build and test with sanitizers (ASAN, UBSAN, TSAN) when not measuring performance, and use static analysis beyond compiler warnings (Clang Tidy, Clang Static Analyzer).<p>Though the author doesn&#x27;t look to be trying to write a great tutorial, rather prioritizing sharing what and how they learned something from their perspective.
      • cohani2 hours ago
        Maybe the author was given monetary support from the Rust Foundation, they have given money to people to write blog posts <a href="https:&#x2F;&#x2F;rustfoundation.org&#x2F;media&#x2F;introducing-our-newest-project-grantees&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rustfoundation.org&#x2F;media&#x2F;introducing-our-newest-proj...</a> . They love media instead of technical work.
      • tialaramex1 hour ago
        &gt; Turn the warnings into errors too,<p><i>Please</i> stop smashing all the nuance out of compiler diagnostics this way.<p>One of the biggest successes of Rust has been its great diagnostics and I can assure you that it would <i>not</i> help to smash my Clippy lint suggesting that what I wrote looks a lot like an implementation of the addition operator† into a fatal error like the one I get for forgetting to initialize a variable.<p>Rust even has a (begins empty) diagnostic category [named &quot;expect&quot;] for &quot;This warning should be here&quot; which will flag cases where a notable thing not only <i>might</i> happen here and if it does we can ignore that, but if it&#x27;s no longer detected that is itself suspicious and should be diagnosed.<p>† Yes it does Clippy, and I considered implementing Add but I had a good reason not to, so here is a suppression annotation.
    • bjackman2 hours ago
      &gt; This is not a substitute for a proper C tutorial
    • kingforaday2 hours ago
      I&#x27;m with you. Since the post already shows Clang catching the array-decay bug, the author could even just add a “always build with -Wall -Wextra -fsanitize=address,undefined” note and some explanation of course.
    • jminnl2 hours ago
      Asan!
  • phamilton2 hours ago
    Re: arrays are pointers.<p>One of my favorite things to show just how bare this is in C is to show array access commutativity.<p><pre><code> char c = {1,2,3} c[1] == *(c + 1) *(c + 1) == *(1 + c) c[1] == 1[c] </code></pre> C is wonderfully simple at times.
    • pwdisswordfishq1 hour ago
      I have known about this for quite some time, and the more I think about it, the more useless it seems. Sure, the underlying machine operation is just addition, which is indeed commutative, but at the type system level, the pointer and the offset have distinct roles. It just makes no sense to allow to commute them, just like it makes no sense to allow to commute arguments to, say, strchr, just because the compiler can figure it out by looking at the types. When was the last time you had a practical reason to write &quot;offset + pointer&quot; or &quot;index[array]&quot;?<p>In most languages, the indexing operator is not commutative. In Rust, pointer offseting is expressed as a function call or a method, also not commutative. I have never seen a single complaint about either. It&#x27;s not something people want or care about, it&#x27;s just a tedious detail.
      • skydhash41 minutes ago
        &gt; It&#x27;s not something people want or care about, it&#x27;s just a tedious detail.<p>It’s not something idiomatic, but indexing in C is syntactic sugar. Not sure why they allow it in the syntax, but forgetting that arrays are pointers and not special type is just asking for bugs.
        • im3w1l28 minutes ago
          Arrays are not pointers in c. Though they are very similar and will implicitly convert, there are differences. The big and obvious difference is that declaring an array will allocate space for it. In a function, on the stack. In a struct, inline. They have different sizeof. I think there are also some other stuff I can&#x27;t remember.
    • creata35 minutes ago
      As fun as it is, 1[c] will be &quot;marked obsolete&quot; in C29 according to Wikipedia.
    • mr_00ff001 hour ago
      All fun and games with arrays being pointers, until you declare an array in a function and return it.
      • jackling1 hour ago
        Isn&#x27;t this easily catchable with static analysis, -Werror -Wall? I&#x27;ve never had a practical problem with this.<p>Also arrays aren&#x27;t pointers in C, they decay into pointers. You can see this since sizeof will work differently in the function that instantiates the array versus one that takes in the pointer as a parameter.
    • skydhash45 minutes ago
      &gt; C is wonderfully simple at times.<p>Yesterday, I watch a quick video[0] where Matthew Butterick was comparing book sizes and their appeal. “The C Programming Language” was my second programming book (after one about JavaScript 1.x) and I still remember it fondly. Easy to start with (with CodeBlocks on Windows and gcc on Linux) and the concepts were nicely explained. The book were also very nice.<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=W-ryv6TwQvM" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=W-ryv6TwQvM</a>
    • Ygg21 hour ago
      Isn&#x27;t Lisp even more bare bones?<p>At end of day minimalism is a neat but not decisive feature. If minimalism was decisive we&#x27;d all be writing Brainfuck.
      • brabel1 hour ago
        Lisp minimalism is very different. It assumes a runtime with automatic memory management for example, even if the language concepts themselves are minimal, especially in Scheme, it has almost no syntax and just a few core facilities on top of which everything else is built, which are closely related to the Lambda calculus, kind of ignoring completely what real computers actually look like.<p>In C the minimalism comes from providing only the minimal set of things that are available in most (maybe all) architectures (the Von Neumann paradigm), like linear memory, a simple function calling convention, close mapping to Assembly operations etc. But C syntax is not very minimalist compared to Lisp , let alone Forth. The fact that C syntax became prevalent in the programming world seems to be mostly an accident to me, it’s not objectively better than those minimalist languages’ or Pascal’s, Prolog, ML families.
      • KerrAvon1 hour ago
        I would add on top of brabel&#x27;s post that C is surprisingly difficult to parse correctly (C++ notoriously so).<p>Zoom out a little: C is a lot like Unix: simple probably isn&#x27;t the right word; `underengineered` comes to mind. Which leads to complexity, as you need to make things work in the real world. And so Unix syscalls being designed in the early 1970&#x27;s for a PDP-11 don&#x27;t really map to modern needs. And so every unanalyzed complex C app has memory leaks.<p>To be clear, I like C, I like C++, I like Objective-C, I like Swift; I&#x27;m comfortable in all of them. But, in 2026, I don&#x27;t see why for native code everyone shouldn&#x27;t be programming in Rust &#x2F; Swift &#x2F; other modern memory-safe flavor for any new production use. Zig if you want faster compile times, I guess.
        • skydhash34 minutes ago
          &gt; But, in 2026, I don&#x27;t see why for native code everyone shouldn&#x27;t be programming in Rust &#x2F; Swift &#x2F; other modern memory-safe flavor for any new production use. Zig if you want faster compile times, I guess.<p>Because C is very simple (unlike Rust) and works everywhere. Zig is not yet stable. Go and Swift are under the governance of tech companies.<p>The true appeal of C for me is the standard and how it applies only to the language. You can easily take a project from 2 decades ago and port it to a current platform. Lot of current ecosystem is way too fussy about tooling to do this.
    • mathisfun1231 hour ago
      &gt; One of my favorite things to show<p>Who have you shown this to? What kind of person is impressed by this? Anyone that programs in any other language already knows that syntax is fungible so who cares if C chooses to use addition and brackets this way. So the only people that might be impressed by this are people who don&#x27;t program. In which case why are you showing them lol.<p>For example (assuming you&#x27;re a C programmer) are you impressed by this python syntax<p><pre><code> [a] * 3 == [a, a, a]</code></pre>
      • junon1 hour ago
        Man just let people enjoy small things.
        • mathisfun1231 hour ago
          I don&#x27;t know what you&#x27;re implying - I asked a genuine question: what is impressive about that syntax.
          • 171862744036 minutes ago
            It&#x27;s not the syntax that&#x27;s impressive. It&#x27;s that most people who don&#x27;t know C, likely wouldn&#x27;t consider array access to be commutative.
          • junon39 minutes ago
            They never said it was impressive. Just that they like to demonstrate it, presumably to people who don&#x27;t know about it.
  • layer855 minutes ago
    &gt; Woah, iterating over pointers instead of indexes! […] However, I&#x27;m not sure how good an idea that is.<p>I’d recommend anyone (including the author) wanting to understand C to read K&amp;R’s “The C Programming Language”, which among other things will illustrate how iterating over pointers is idiomatic in C (though not quite in the way the author’s example does it).
    • Joel_Mckay13 minutes ago
      GLib simple C data structures:<p><a href="https:&#x2F;&#x2F;docs.gtk.org&#x2F;glib&#x2F;data-structures.html#doubly-linked-lists" rel="nofollow">https:&#x2F;&#x2F;docs.gtk.org&#x2F;glib&#x2F;data-structures.html#doubly-linked...</a><p>GSL GNU Scientific Library for C:<p><a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;gsl&#x2F;doc&#x2F;html&#x2F;intro.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;gsl&#x2F;doc&#x2F;html&#x2F;intro.html</a><p>In general, no one should be custom building most basic structures in C these days. =3
  • ReDress3 hours ago
    I&#x27;m going to go out on a limb here and make a wild guess.<p>That boolean is actually mostly an extension of the integer system whereby we now have an integer type that stores only one bit.<p>Whereby the bit stored either results in a &#x27;true&#x27; or &#x27;false&#x27; value.<p>Anyways, I know booleans are useful in systems development when you have strict memory &#x2F; storage constrains &#x2F; bandwidth (networks).<p>Yeah, that works for me.
    • cogman102 hours ago
      The way C handles (prior to C23) booleans is pretty close to how you&#x27;d handle booleans in assembly.<p>CPUs don&#x27;t have types, everything is integers or floats. You do your work on registers which have fixed sizes. CPUs have built in instructions for &quot;is this register not zero&quot; which leaks into C. 1 is true in C, but so is 2.<p>Also, single bits are rarely used for booleans because it requires more CPU power to extract a single bit. Everything is byte aligned at a minimum.<p>When doing something like network code, if you want to store a bunch of booleans you are typically going to either pack them into a byte, or you&#x27;ll burn the extra bits and send a single byte for the boolean value. Typically this was flags and masks.
      • quikoa38 minutes ago
        &gt; Also, single bits are rarely used for booleans because it requires more CPU power to extract a single bit.<p>Not necessarily, on modern CPUs memory access is often the bottleneck. If you have many bits storing these in a bitarray can be quite beneficial for performance.
      • xhroot2 hours ago
        &gt; single bits are rarely used for booleans<p>SQL Server still has no boolean type and groups bits in the same row into a byte if possible.
    • bjackman2 hours ago
      &#x27;bool&#x27; is still at least 1 byte in C. If you want to store one Boolean per bit you have to manually implement a bitmap.
      • viega2 hours ago
        A bool does automatically cast to an unsized bit slice.<p>Meaning, if you have a struct and you want to bit-pack your booleans, you can declare each one as, say, uint8_t some_bool : 1;<p>You may then do `x.some_bool = true;` etc.<p>It&#x27;s a small nicety to avoid bitwise operators, anyway.
      • tyromaniac2 hours ago
        Or pull out the C++ and use std::vector&lt;bool&gt;,... But you should probably never do that
        • randomNumber71 hour ago
          I heard the C++ guys regret defining vector&lt;bool&gt; using 1 bit per value.<p>Also for most code it will be premature optimization to worry about that.
          • KerrAvon1 hour ago
            From what I can tell in a cursory web search, that regret is more about issues with C++ being unable to abstract that field vs bit divergence properly, not about the concept of having the specialization be bit-based, which is sound.
            • tialaramex29 minutes ago
              I think your description is technically accurate, but maybe this phrases it better:<p>std::vector&lt;bool&gt; is a perfectly nice growable bit array type, and if the exact same code were in the C++ standard library named std::growable_bit_array nobody would be annoyed about this type, some people would use it, others would ignore it, nobody would write epic rants about it or name it the singe worst thing about C++.<p>The problem is that C++ popularized generics, and std::vector&lt;T&gt; is a generic growable array type, you ask for a std::vector&lt;Goose&gt; you get a growable array of your custom Goose type, great idea, very popular these days -- yet std::vector&lt;bool&gt; is not a generic growable array of bool, it&#x27;s this other thing instead that&#x27;s similar but not quite similar enough to be a drop-in replacement.<p>In C++ there is no way for the specialization to be bit-based without it being apparent that you are not in fact getting a growable array of the bool type.
      • ReDress2 hours ago
        [dead]
  • kvemkon2 hours ago
    &gt; the program should check for a null pointer and gracefully exit if one is found: ...<p>If malloc() fails, there is no need to exit the program completely with exit(), only return from the current function with an error.
    • randomNumber71 hour ago
      It is impractical to try to recover&#x2F;continue your program in an out of memory situation for most programs.<p>So it is a good advice for beginners.
      • smj-edison15 minutes ago
        I think this is fair the majority of time, but I&#x27;d like to mention Zig, since Zig has a convention of all allocations being fallible and handled. It&#x27;s a pain at first to handle error.OutOfMemory at each allocating site, but I feel like I&#x27;m much more conscious of where allocation can fail and how to gracefully handle it. I&#x27;ve also gotten a lot better at transactions since pretty much every operation has failure points now.<p>In fact I&#x27;ve written a whole interpreter that can recover from OOM by raising a recoverable exception to the user. It&#x27;s really only because Zig made recovering idiomatic, and I&#x27;m not sure I could&#x27;ve done it in another language (maybe Rust but I&#x27;d have to rewrite large parts of stdlib to both return an error and take a custom allocator).
      • layer850 minutes ago
        If the code is in a library (and I’d treat code as if being part of a library by default), then the library shouldn’t be deciding that.
      • 171862744033 minutes ago
        But in order to able to show proper diagnostics and error messages, you should still return all the way to the top.
        • im3w1l19 minutes ago
          No one does this. The best you can hope for is that a rare few especially error prone allocations (perhaps they are huge, or user controlled) are handled. Someone might I suppose also wrap all malloc calls in a function that shows a dialog or error message and only then exits. But returning all the way to the top, yeah.. no..
  • bjackman2 hours ago
    It&#x27;s beautiful to see this perspective! The fact that we are at &quot;whoa, C is fucked up compared to my expectations&quot; instead of &quot;look at Rust&#x27;s fancy safety stuff&quot; shows that as a field we&#x27;ve started lifting the baseline.<p>Nowadays I actually believe I&#x27;ll likely see a world without memory corruption within my lifetime.
    • cohani1 hour ago
      Focusing narrowly on memory safety is frequently a distraction that incompetent developers use to excuse their buggy code. &quot;Sure, my Rust code might cause deaths and cause millions of dollars lost; and my code might be unsafe, insecure and incorrect; but at least my code is memory safe and easy to debug when I fuck it up!&quot;. And then it often turns out that Rust is not memory safe in practice. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49697392">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49697392</a><p>The real value of Rust is likely pattern matching and tagged unions. Apart from modules&#x2F;packages that are not a disaster, like Gabriel Dos Reis the saboteur&#x27;s disaster with modules in C++.
      • nilslindemann1 hour ago
        Were you intentionally rude with your first sentence or just unaware?
        • cohani26 minutes ago
          You are being worse than rude, while I am being accurate and not rude. Kindly do better.
    • the__alchemist2 hours ago
      My take too. (Aside from this being a well-written, clear article, that I think highlighted a fair selection of relevant points; especially the &quot;always use uint8_t instead if int&quot; part).<p>I don&#x27;t see rust a &quot;memory safe&quot; language, or a niche one. I have complaints about it etc, but it&#x27;s overall a fair baseline of reasonable decisions. When I look at C or other languages rust has learned from, I have more &quot;Yikes, that&#x27;s rough&quot; takes. So... rust as the language of least &quot;fucked up&quot;, to use your phrase? Ownership&#x2F;safety are one part of the picture, but not what defines it for me.
      • cohani1 hour ago
        &gt; Rust<p>&gt; least &quot;fucked up&quot;<p>C has the excuse that it is ancient, but it is tiny and has a lot of different implementations. Rust gccrs is still crawling along, fixing up the huge holes in the Rust &quot;specification&quot; along the way.<p>To Ygg2:<p>Why do you lie? Please stop being dishonest, incompetent and schizophrenic.<p>&gt; Ferrous Systems Achieves IEC 61508 (SIL 2) Certification for Rust Core Library Subset
        • the__alchemist14 minutes ago
          Is this the sort of thing you only need to know about if building&#x2F;maintaining compilers? I ask because I don&#x27;t know what that means from a practical perspective. I&#x27;m familiar with Ferrous systems from their work on probe-rs, defmt, and flip-link, which are exquisite libraries &#x2F; tools.<p>edit: I think this is a bot or troll account.
        • Ygg21 hour ago
          Rust never had a goal of having well defined spec. It all depends on what ecosystem wants.<p>In lieu of that it didn&#x27;t fuck up.
    • kingforaday2 hours ago
      It’s definitely great that memory safety is becoming more pervasive. Though I’ll believe “a world without memory corruption” right up until another &lt;insert your relevant hacker hero name&gt; comes along and finds a way through an unsafe block, an FFI boundary, or the hardware itself (Rowhammer says hi).
      • bjackman2 hours ago
        &gt; Rowhammer says hi<p>Yeah I was thinking of prefixing my &quot;memory corruption&quot; with &quot;software-bug induced&quot;! I don&#x27;t see a credible solution to Rowhammer. (&quot;DDR[n+1] fixes it&quot; - lol)<p>&gt; an unsafe block, an FFI boundary<p>Honestly these feel solvable to me at this point! I think we&#x27;ll see:<p>- unsafe code shrink as languages get more powerful<p>- amount of analysis we can apply to each unsafe line shoot up exponentially as AI gets cheaper<p>- amount of FFI we actually need shrink as it gets easier to just click &quot;rewrite it in $lang&quot; on the decision card when your coding agent says &quot;I found a library for that but it&#x27;s in a different language&quot;<p>(Having said all of that, people seem to be adopting Zig for some bizarre reason... So maybe I&#x27;m naive to expect unsafe lines to shrink)<p>(But also, maybe AI gets so good and so cheap that we can just type &quot;go fidn all the bugs andfi xthenm&quot; into an LLM, between sips of a Piña Colada)
        • smj-edison3 minutes ago
          I&#x27;m one of those people who&#x27;s adopting Zig :) But I don&#x27;t think it&#x27;s best for every project. For context, I&#x27;ve used Rust before for probably two years writing a realtime audio synthesis engine, so I&#x27;m fairly familiar with Rust vs Zig for handling low level details.<p>The biggest reason I use Zig is it&#x27;s a very explicit language. The creators made a very intentional decision to avoid too many &quot;high level&quot; designs. This doesn&#x27;t mean there&#x27;s no capabilities for abstraction (comptime is great for that), but when you see array indexing, you can think &quot;ptr + index * size with bounds check&quot;. There&#x27;s lots of other things like that where the language does exactly one thing, and that thing is a low level operation.<p>This is terrible when you want to create high level abstractions that hide details from the programmer, but it&#x27;s what I need when doing realtime audio synthesis or what I&#x27;m doing now which is writing an interpreter. I know exactly what allocates, I know what calls IO and can block (both operations explicitly take in an allocator or IO parameter), no data structures have private fields so I can always poke around at the insides. I know what types of errors a function returns, and creating errors is cheap with Zig&#x27;s error union design.<p>So I don&#x27;t use Zig because I think it&#x27;s the safer language, I know it has sharp edges because of the number of times I&#x27;ve caused a panic on a poisoned pointer or use-after-free. But because it gives me such a transparent view into what is happening I find it liberating.
  • rramadass1 hour ago
    Read the following if you want to be a C Programmer;<p><i>Fluent C: Principles, Practices and Patterns</i> by Christopher Preschern - <a href="https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;fluent-c&#x2F;9781492097273&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;fluent-c&#x2F;9781492097273&#x2F;</a>
  • _dain_3 hours ago
    <i>&gt;The very first systems programming language I ever learned was Rust. This is uncommon compared to many other programmers; you&#x27;re more likely to find someone who learned C or C++ first before coming to Rust.</i><p>It&#x27;s becoming increasingly common. Rust is my first systems programming language too. I tried to learn C a few years ago but I found it too austere and prickly, which put me off.
    • creata14 minutes ago
      That&#x27;s interesting - to me C is <i>delightfully</i> austere. Most other languages, even much younger languages like Rust, spiral in complexity as they mature. But C hasn&#x27;t grown <i>much</i> more complex since C99.
    • assimpleaspossi3 hours ago
      I was going to write that I found this odd. The kid that cuts my grass is going for a degree in CS and told me just yesterday that, in his second year, Java is the language he uses with a little Python. That C was such a struggle and he won&#x27;t touch it.<p>For someone getting a CS degree, that just seems so, so odd. Along with that, he&#x27;s been studying edge detection in images. In his second year. Not to run off topic but, again, I find that so, so odd.
      • le-mark1 hour ago
        When I was in college at a large Midwest university in 2002 intro cs classes were taught in C. Business majors were required to take cs 101 taught in C. We had a project that required implementing linked lists, oh how the business majors suffered! We all did actually but at least the cs majors could use the knowledge!
        • randomNumber753 minutes ago
          Stuff like this was often done to enforce a minimum IQ.<p>Very reasonable imo as universitys educated people that get positions with responsibilitys.
    • ReDress3 hours ago
      Probably because C and C++ are mostly used in system and desktop development.<p>Rust is taking steps or has been taking steps in this direction too.<p>It&#x27;s not surprising that a lot of experienced systems and desktop development engineers looking to getting their hands on the newest tool already have experience or at least familiarity with C and C++.
  • blourvim1 hour ago
    It reads really well
  • pwdisswordfishq1 hour ago
    isize and usize seem to be more like intptr_t and uintptr_t. To be fair, for a long time it was not very well-defined to which C type they correspond to; I think that was cleared up only recently.<p>It&#x27;s also a shame the article uses the self-delusional C++ style of pointer declarators.<p>Otherwise pretty okay.
    • tialaramex3 minutes ago
      They&#x27;re not great analogs to any of the C types because C and C++ have a different relationship to pointers than Rust does but particularly they are not intptr_t &#x2F; uintptr_t because those claim that we can intra-convert between these types and pointers.<p>On a typical PC that doesn&#x27;t seem like a problem, and it will (at least kinda) work which might give you the false impression it&#x27;s required to work, which it very much is not in Rust. On CHERI it&#x27;s obvious why this can&#x27;t work. CHERI&#x27;s pointers are 128-bit. Rust does <i>have</i> 128-bit integers, but Rust&#x27;s isize and usize on CHERI will be 64 bits. Because only half of CHERI&#x27;s pointer bits are address bits, and Rust told you that isize and usize were big enough for the <i>address</i> not the whole pointer.<p>Many clever pointer tricks only want to fiddle with the address. For example hiding bit flags in an aligned pointer works, as does hiding the entire value inline in today&#x27;s enormous pointers (64 bits! Luxury) and using a single bit to mark &quot;not a real pointer&quot;. In Rust we do these with the actual raw pointer types, they have methods like any other type, but in C or C++ you need to convert to a pointer-sized integer and then do tricks with the integer or you will write UB.
  • elendilm45 minutes ago
    My own journey has been quite different.<p>When I was building my kernel in my late teens, I first wrote the bootloader by hand on paper in assembly language. I then referenced the x86 manual for the instruction set and converted my assembly code into the equivalent hexadecimal machine code values of the x86 machine instructions, which I also wrote by hand on paper. Then I used a hex editor on the desktop to manually write the hex values into a file and used it as the bootloader i.e as the first 512 bytes.<p>The whole exercise gave me a sense of hard grounded zero magic, raw, unfiltered experience. This is an experience that is hard to replicate in any other way. I deliberately did that so as to peel away as much magic&#x2F;abstraction layers as I possibly can.<p>Later on when I started using C, I never had to learn C but merely just had to reference the equivalents of the assembly language. Like how the primitive &quot;if&quot; doesn&#x27;t exist in the hardware but is a composition of cmp and jmp instructions. Seen this way, C becomes a glorified portable syntactic sugar over assembly language.<p>Then higher up the ladder to C++ for object oriented problem solving while retaining the spirit of functional programming. Rust was a breath of fresh air, where correctness across a myriad of use cases was a first class primitive.<p>Each abstraction layer can thus be evaluated for its utility in problem solving while its underlying mechanics remain understandable down to the hardware level.<p>More recently, our own arcc compiler extends correctness to our architecture and not just the types.<p>So if you are young and have time to spare, I suggest a little bit of assembly =&gt; C =&gt; C++ =&gt; Rust.<p>This essentially makes you immune to hype train bullshit.
  • jmclnx2 hours ago
    Really just another use Rust instead of c article.
  • BitProgram2 days ago
    [dead]
  • caaqil2 hours ago
    &gt; there are plenty of &quot;Rust for C Programmers&quot; articles on the internet, but little to no &quot;C for Rust Programmers&quot; articles out there.<p>Why would a Rust programmer learn C? Isn&#x27;t that basically a regression?
    • cohani1 hour ago
      It is easier to write a C compiler from scratch than a Rust compiler from scratch. No usage of LLVM or anything like it.<p>That also reflects in that many embedded systems offer C support and do not offer Rust support.
    • orbitaldesk1 hour ago
      [flagged]