3 ms·
It varies per person. The history of imperative programming branches off from ALGOL into several directions. One was to C and then C++. Here's my point-by-point
by nickpsecurity 10y ago
It varies per person. The history of imperative programming branches off from ALGOL into several directions. One was to C and then C++. Here's my point-by-point trace of how those were "designed." You'll see that C is more an accident of history designed to work on ancient hardware then lots of uptake since UNIX was written in it. C++ was actually designed carefully on top of C with features from many languages but inherits C issues and kludginess of that approach.
http://pastebin.com/UAQaWuWG http://pastebin.com/UAQaWuWG
Now, there were a few other paths from ALGOL. One was Wirth's tradition of languages that were simple, type-safe, memory-safe as possible, compiled lightening fast, consistent, and still performed well. Started with Pascal with Turbo Pascal and Delphi being big commercial successes. Drawback with him was he leaned too far to simplicity as some features might justify extra complexity. Yet, the Oberon's, Modula-3, and Component Pascal derived from this style could do much of what C++ developers could with more safety, consistency, and development speed. Examples below:
https://en.wikipedia.org/wiki/Modula-3_%28programming_language%29 https://en.wikipedia.org/wiki/Modula-3_%28programming_langua...
http://blackboxframework.org/index.php?cID=why-program-in-component-pascal,en-us http://blackboxframework.org/index.php?cID=why-program-in-co...
http://www.freepascal.org/ http://www.freepascal.org/
Another branch was Ada family. It was designed to prevent as many faults as possible in embedded programming mainly. They systematically eliminate them with syntax, semantics, and defaults. SPARK variant extends that to automatically prove absence of common errors in code via formal verification that runs behind the scenes. The systems were never popular for various reasons but empirical studies by military showed vastly lower defects than C or C++ with productivity and maintenance advantages.
http://www.adacore.com/uploads/technical-papers/SafeSecureAdav2015-covered.pdf http://www.adacore.com/uploads/technical-papers/SafeSecureAd...
http://libre.adacore.com/ http://libre.adacore.com/
So, ignoring functional programming and such, it's hard for me to like C++ coming from a Pascal background where the syntax was readable even to lay people a bit (a la BASIC), operations were safe by default, compiles up to 100kloc/sec on Pentium3, no segfaults, less hacks, GC by default, unsafe for speed if I need it, and small set of features all developers understand and use. C++ was nothing like that although they've improved it a lot over time.
So, given I know better stuff is possible and even out there right now, I have to still think C++ is crap because it combines pieces inconsistently to approximate stuff like I use plus builds on an unsafe foundation with undefined behavior.