3 ms·
Yes. Languages * C should have had standard types comparable to Rust's Vec and String. Pascal did. Null terminated strings were a terrible idea, and are still
by Animats 2y ago
Yes.
Languages
* C should have had standard types comparable to Rust's Vec and String. Pascal did. Null terminated strings were a terrible idea, and are still a curse. Plus a sane set of string functions, not "strcat" and its posse. Didn't have to be part of a general object system. Should have happened early.
* Slices. Easy to implement in a compiler, eliminates most of the need for pointer arithmetic. Again, should have happened early.
Those two alone would have eliminated tens of thousands of pointer bugs and decades of security holes.
Operating systems
* UNIX should have had better interprocess communication. It took decades to get that in, and it's still not that good in Linux. QNX had that figured out in the 1980s. There were some distributed UNIX variants that had it. System V had something.
Networking
* Alongside TCP, there should have been a reliable message-oriented protocol. Send a message, of any length, it gets delivered reliably. Not a stream, so you don't have issues around "is there more coming?". There are RFCs for such protocols, but they never went anywhere.
Databases
* Barely existed. This resulted in many hokey workarounds.
With all of those, we could have had CRUD apps by the late 1980s. That covers a whole range of use cases.
There were client/server systems, but each had its own system of client/server interconnection. With all of the above,
it would have been much easier to write basic server applications.
- nateglims 2y agoHow popular was C in the early 1980s though? I suspect BASIC and assembly where much more prominent until late in the decade.
- msephton 2y agoC was very popular throughout the 1980s, and was the first choice for systems programming. C was created in 1972 by Dennis Ritchie. In 1973 he used it to rewrite the entire Unix kernel. The popularity of both C and Unix grew alongside eachother. The preeminent C book by Kernighan & Ritchie was published in 1978, with 2nd edition coming in 1988 with ANSI-C staged. The book was the first use of "Hello, world!". So even that was very influential. Great article for further reading: https://www.jakeo.com/words/clanguage.php https://www.jakeo.com/words/clanguage.php
- kamaal 2y agoC was very much the Python of its times, may be even bigger. Especially given the fact that it started a whole family of programming languages being derived from it. C++ was very much the language of choice for larger applications till Java came along. Till date if you are writing code for embedded systems the only language you can do so in is C. Even until very recently most beginner programming courses/approaches required you learn C. Learn Pointers, recursion well enough before you could learn anything else.
- deleted 2y ago[deleted]
- telotortium 2y ago> * Alongside TCP, there should have been a reliable message-oriented protocol. Send a message, of any length, it gets delivered reliably. Not a stream, so you don't have issues around "is there more coming?". There are RFCs for such protocols, but they never went anywhere. HTTP works well enough for this for basic use cases, assuming Content-Length is set. That's probably one of the reasons it's become the default protocol.