News for hackers. Stuff that matters.
Re:Everything I wish I knew when learning C by a1369209993 on Monday November 28, 2022 @05:33PM (#33780843)
> There's no particular reason why C doesn't allow you to assign one array to another of the same length

Actually, there is a particular (though not necessarily good) reason, since that would require the compiler to either generate a loop (with conditional branch) for a (unconditional) assignment or generate unboundedly many assembly instructions (essentially a unrolled loop) for a single source operation.

Of course, that stopped being relevant when they added proper (assign, return, etc) support for structs, which can embed arrays anyway, but that wasn't part of the language initially.

Re:Everything I wish I knew when learning C by pjmlp on Tuesday November 29, 2022 @02:50AM (#33784769)
It was initially available in 1982, so plenty of time to add the other features.

https://www.bell-labs.com/usr/dmr/www/chist.html