Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> And, yet, if you like one, there's a very good chance you like the other.

Among my friends I know several people who are very enthusiastic about board games and several who are very enthusiastic about craft beer, but there's not a particular noticeable overlap. Personally of course I am very into board games and I don't drink at all.

> I would argue that C is not a minimalistic language either. There is a lot under the hood in C.

Nah, C actually is small, that's why K&R is such a short book. It makes enormous compromises to pull that off, but presumably on a machine where 64kB of RAM is extraordinary these compromises made lots of sense. C23 is quite a bit bigger, for example "bool" is now an actual type (albeit implicitly convertible) but still small by modern standards.

There really isn't that much "under the hood", it's often just the least possible moving parts that could possibly have worked.

a[b] in C++ is a call to a member function a.operator[](b) -- arbitrary user code

a[b] in Rust is a call to core::ops::Index::index(a, b) or, in context IndexMut::index_mut -- again, arbitrary user code

a[b] in C is just a pointer addition of a and b - one of them will be converted to a pointer if necessary, and then the other one is added to the pointer using normal pointer arithmetic rules



> Nah, C actually is small,

I'd argue that C is much bigger than K&R, but that isn't immediately visible to a new programmer because it's all undefined behaviors.


C23 + compiler extensions versus K&R C, is a little more than only UB.


Except C in 2025 isn't K&R C, rather C23.

Also even between C89 and C23, many folks wrongly count "whatever my compiler does" as C, and there are endless amounts of extensions to be aware of.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: