3 ms·
Ada was designed a few years before C and it could do much more than C and without the problems you mentioned. So we don't have to wonder at all, it would have
by bsdetector 6y ago
Ada was designed a few years before C and it could do much more than C and without the problems you mentioned.
So we don't have to wonder at all, it would have turned out exactly the way it did and the reason is because things like undefined behavior, zero terminated strings, null pointers, etc have positive utility underappreciated by academics.
- csb6 6y agoThat’s not really a good comparison. The reason C has been so prevalent is because it was used to make Unix, which was distributed widely for decades, and because it was relatively simple to write compilers for it/port it to new platforms. Ada doesn’t exist in the same context; compilers were expensive and not widely distributed, there wasn’t a free, open-source compiler until GNAT in 1995, and Ada was never the default systems language for any widely distributed OS. I mean the circumstances could not be more different. If C had been designed as a safer language (with even just small improvements that would not have been hard to implement), it would still be widely used and there would be fewer security problems associated with it. It is the Just World Fallacy [0] to assume that the most widespread language became so on its merits and not based on its historical context. [0] https://en.m.wikipedia.org/wiki/Just-world_hypothesis https://en.m.wikipedia.org/wiki/Just-world_hypothesis
- jecel 6y agoThe connection with Unix was indeed a huge factor in the popularization of C. About Ada, it is actually a decade newer than C. In 1982 I was part of a group that was keeping track of its development and had learned C from old Bell Journals. I was able to a buy a book on Ada and the famous K&R C book and decided I preferred simplicity, so I donated the Ada book and dropped out of the study group. It is ironic that the even more complex (than Ada) C++ was what eventually became popular.
- BrendanEich 6y agoC history: https://www.bell-labs.com/usr/dmr/www/chist.html https://www.bell-labs.com/usr/dmr/www/chist.html Ada history: https://www.adahome.com/History/ https://www.adahome.com/History/ FYI, I worked on a self-hosted Ada compiler as a grad student intern at Rolm (the Mil-Spec computer side, not the digital PBX side) in the summer of 1984.
- csb6 6y agoVery cool! I’ve used Ada in my spare time, and it has a lot of good features that I wish C-family languages had (like strong typedefs, no implicit conversions, better ways to do things than passing pointers around, arrays that don't decay into pointers, and types constrained to ranges). It is a lot more complex than C, but it feels a lot easier to read, and while it takes longer to write (for me) than C, it has a lot fewer weird edge cases/quirks to it than C does. It also seems to have more powerful ways to set the exact machine representation of types than C.
- bdavis__ 6y agoIn the early 1990's a hardware vendor demo'ed an ada compiler at a customer site. Fortran compile of a subroutine was about 30 seconds, link of an executable was about 5 minutes. We booted the ada disk first thing in the morning, changed some writeln() statements, and kicked off the build. After lunch, the executable was ready (this was not "hello world", but a system with maybe 50K SLOC. Not practical on that date, with machines that existed. As for writing code that worked, and eliminating defects by language design, ada has no peer. Even in 2021. Today compile time is not a problem.
- throwawayboise 6y agoAt around that time, I would see multi-hour delays on compiles of COBOL code on a busy mainframe. Not because the compiles really took a long time, but because the development region could not keep up with the submission rate of compile jobs from developers. That aside, work got done. You spent a little more time checking your code for errors instead of letting the compiler do it.