Hacker News

Favorites Setup
Comment by brabel | original | C for Rust programmers
[−]brabel · 2026-10-10 Sat 14:43 UTC · link
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.

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.

[−]Ygg2 · 2026-10-10 Sat 18:04 UTC · link
> In C the minimalism comes from providing only the minimal set of things that are available in most (maybe all) architectures

By that logic Brainfuck is even more minimal. Again. I'm saying minimalism isn't the goal. It's a good quality but not most important one.

[−]brabel · 2026-10-11 Sun 08:36 UTC · link
You just misinterpreted what I said. I was referring to a minimum common denominator of cpu architectures. Brainfuck has nothing to do with that.
[−]WalterBright · 2026-10-11 Sun 00:07 UTC · link
> providing only the minimal set of things that are available in most (maybe all) architectures

The rise of C in the 1980s induced CPU makers to design instructions that cater to C semantics.

[−]xtajv · 2026-10-11 Sun 08:17 UTC · link
That is because C already worked everywhere even before CPU makers agreed on things like making pointers and words the same size.

Edit: And by "worked everywhere" I mean C did the heavy lifting of being a programming language that was even a little bit portable across architectures.

[−]pjmlp · 2026-10-11 Sun 09:46 UTC · link
PL/I had more knobs for portability, but neither Multics, nor IBM Oses were available for free.
[−]uecker · 2026-10-11 Sun 08:42 UTC · link
I don't think this is really true. What instructions would this be?

In contrast, Intel introduced a lot of instruction for PASCAL, e.g. enter / leave etc. which are basically unused.

[−]rramadass · 2026-10-11 Sun 03:10 UTC · link
> 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.

This is beautifully illustrated in the old classic The C Companion by Allen Holub which overviews a simple abstract demo architecture and code generated for it. This is a small book (in the vein of K&R C) but contains enough illuminating info. for a programmer.