u/Null-Test-2026

can a language be safe and be a subset of C?

Imagine you start with the C language and then make the following changes:

  1. Remove pointer arithmetic. You want an array, you declare an array.
  2. Change the compilation of string and array literals to emit a length prefix.
  3. Rewrite the entire standard library so that all string and array functions enforce a length header in front of the data.
  4. Add RTTI to all unions and varargs so that incorrect casts fail rather than UB.
  5. Remove `void *`.
  6. Forbid malloc() without static compile-time verification that the matching free() exists (with some sort of Bounded Model Checking to sidestep a rather inconvenient Halting Problem).

Is such a language possible?

Has it ever been attempted?

reddit.com
u/Null-Test-2026 — 4 days ago

mystery material - a missed opportunity

I watched the movie without reading the book.

In the early Earth scenes, it is revealed that Grace ruined his career while defending a belief that life could be possible without carbon and water. There is a subtle build up to where you think he'll be proven to have been right all these years, only to find out astrophage is CARBON AND WATER. The reveal is comedic gold, and some great acting, if you caught it.

Later in the HM, Grace is frustrated when his portable spectrometer shows Xe for the composition of the mystery material.

And here comes what is probably my only criticism of the whole movie so far... not a plot hole, but a missed opportunity by the writers:

It would have been funnier if the spectrometer had read ^(C)?^(H)2^(O), i.e. carbon and water. Unable to detect number of carbon atoms, presumably in some unknown polymer-crystal-nanocomposite form, which could be clarified later, in place of the "metallic form of xenon" reveal.

For extra scientific intrigue, the chemical signature should have some vague relationship to astrophage cell membranes, as if there is some universally common hydrocarbon building block that's just unknown to humans.

reddit.com
u/Null-Test-2026 — 12 days ago