← Back to context

Comment by lelanthran

16 days ago

> You asked how sum types work in assembly.

No, I didn't - I asked how sum types were supposed to work in an era of 64KB memory systems.

They don't need extra memory in Rust for the case of nullable pointers.

The boring cases require an enum tag in C too.

By bringing up the one thing that doesn't matter, your argument becomes purely ideological.

  • You're missing the point - give me a Rust compiler that can run and compile in 64KB memory, then you'll understand that the language C was constrained not just by what the output is running on, but by what the machines of the time could actually handle during compilation.

    • Borland's PASCAL did it on the IBM PC.

      And which modern C compiler fits into 64KB? Even TCC needs 100KB. But that's beside the point. No machine of the last 36 (I'll push my chances, 40) years needs to fit a compiler in 64KB.

      4 replies →