3 ms·
A language from 1989 made a mistake? SAY IT AIN'T SO!
by antiquark 3y ago
A language from 1989 made a mistake? SAY IT AIN'T SO!
- sneed_chucker 3y agoTry 1972
- sedatk 3y agoProgramming languages had array and slice types since the 60's. It wasn't like C developers didn't know their value. As a matter of fact, C's relaxed behavior with pointers and arrays when it came out was PRAISED to no end in the 80's like it provided developers great flexibility to do whatever they wanted, and the compiler would get out of the way. It was thought of as a feature at the time. It wasn't an omission but a deliberate choice to do it that way. People only relatively recently started to care about security and maintenance cost of these features.
- akira2501 3y agoWell.. a large portion of the installed base wasn't running an operating system with anything approaching a "permissions model" let alone "dynamic memory" and there were several competing systems and architectures vying for the top. So, the desire and need for that flexibility was entirely warranted.
- FullyFunctional 3y agoAnd it was a great relief compared to my experience in, say, Pascal. You'll need a fairly advanced type system (Rust, Haskell, ...) to express the kind of stuff we wanted to do with static types and a very good compiler to make it efficient. We didn't have that until maybe mid-90es and trying to do it without that either led to very inefficient code or to breaking the type system. So C was [mostly] great, but today we have better options.