11 ms·
Bjarne Stroustrup: “I Did It for You All” (2007)
- mempko 5y agoIt's funny but honestly Stroustrup is the best language designer out there. While others abandoned their creations to make new languages, Stroustrup soldiered on and modern C++ is actually amazing. He's a working programmers language designer, not an academic.
- fwsgonzo 5y agoHe came to our startup once (IncludeOS) and simply asked us what we had problems in, in C++ and what we think about it. Very refreshing. I also won a game of Secret Hitler by denying his veto.
- thechao 5y agoAs a grad student, I was willing to take boutique courses from any of the PLT folk in the larger group (including Bjarne & Gaby). Most of the students were terrified of Bjarne, but I'd sit front-and-center and pepper him with questions. Eventually it got to the point that when I'd show up to lecture he'd shine his (green) laser pointer at me until I moved back & off center. Bjarne's a genuinely good guy, and very smart; I think the "interview" is fun, but it doesn't really sound anything like him.
- marcodiego 5y agoI'd put him in the same level as Anders Hejlsberg. And I'm not a microsoft fan.
- rootlocus 5y agoHe basically added every feature he could think of on top of C, glued it with spit and released it as a pre-processor. There was barely any design involved. Just look at how many types of inheritance there are. I remember Stanley B. Lippman (one of the first developers on cfront) recollecting how the proposal to implement multiple inheritance was met with resistance from the community. And the implementing team realized they couldn't write a sane implementation, and people complained against it, but they made one anyway, partially because they wanted to prove they could. New features to cfront were added with very little concern for design. Things where standardization would have mattered (like the mangling algorithm) were never touched, so now every compiler has the liberty to generate whatever symbols it wants, and call functions with whatever calling convention it chooses, so you either have to compile all your dependencies, or make sure you fetch the binaries that use the exact same compiler version and flags, otherwise they won't link. Also, Stroustrup didn't "soldier on", the CPP standard is maintained by a committee of people from all over the world, and the standard library slowly adopts data types and algorithms from the boost library, because they need a multi-year staging period, handled by someone else, to see if things work before they muster the courage to standardize it.
- pjmlp 5y agoThe reasoning behind what was added is clearly described in the "Design and Evolution of C++" book. Besides the main reason why C++ exists is because he swore to himself never to go through the Simula => BCPL downgrade ever again, and C is a tiny step up from Bootstraping CPL compiler, so....
- rootlocus 5y agoHere are a few excerpts from "The Design and Evolution of C++" Another factor was purely irrational. Nobody seemed to doubt that I could implement templates efficiently. Multiple inheritance, on the other hand, was widely supposed to be very difficult to implement efficiently. For example, in summary of C++ in his book on Objective C, Brad Cox actually claimed that adding multiple inheritance to C++ was impossible. Thus, multiple inheritance seemed more of a challenge. He then goes on a 13 page explanation of how he thought there was a simple implementation. He then acknowledges the controversy, but brushes it aside with: I think - as I did then - that the fundamental flaw in these arguments is that they take multiple inheritance far too seriously. Multiple inheritance doesn't solve all your problems, but it doesn't need to because it's quite cheap. Sometimes multiple inheritance is very convenient to have. I have kept out of the multiple inheritance debates: multiple inheritance is in C++ and cannot be taken out or radically changed; I personally find multiple inheritance useful at times; some people insist that multiple inheritance is essential to their approach to design and implementation; it is still to early to have solid data and experience about the value of C++ multiple inheritance in large scale use; and, finally, I don't like to spend my time on sterile discussions. This goes hand in hand with the original "principles" of C++ design, namely "C++ must be useful now". It didn't really matter how the complexity will evolve in the future, as long as it solved someone's problem today. And once it was implemented, there was no going back, so it didn't matter what people thought, it was done. This process isn't really what I would call "design".
- pjmlp 5y agoSo what would you call "design", the ups and downs of C married with UNIX porting from PDP-7 into PDP-11, or a waterfall design Algol-68 style?
- thom 5y agoI recently went through a bout of existential angst and nostalgia that led me back to the programming languages of my youth. I spent some time in C++ as it is today and honestly found it such a throughly modern language that it didn’t really scratch the itch I was reaching for. Ended up doing a couple of hobby projects in C, which maintains its brutalist charm.
- DonHopkins 5y agoWhat about Anders Hejlsberg? James Gosling designed Java to fix C++, and Anders Hejlsberg designed C# to fix Java, and he also designed TypeScript to fix JavaScript. https://news.ycombinator.com/item?id=22210073 https://news.ycombinator.com/item?id=22210073 From the HN discussion about the video of "A Conversation with Language Creators: Guido, James, Anders and Larry" https://news.ycombinator.com/item?id=19568378 https://news.ycombinator.com/item?id=19568378 https://www.youtube.com/watch?v=csL8DLXGNlU https://www.youtube.com/watch?v=csL8DLXGNlU I posted these Anders Hejlsberg quotes, who co-designed TypeScript, C#, Delphi, Turbo Pascal, etc: https://news.ycombinator.com/item?id=19568378 https://news.ycombinator.com/item?id=19568378 >"My favorite is always the billion dollar mistake of having null in the language. And since JavaScript has both null and undefined, it's the two billion dollar mistake." -Anders Hejlsberg >"It is by far the most problematic part of language design. And it's a single value that -- ha ha ha ha -- that if only that wasn't there, imagine all the problems we wouldn't have, right? If type systems were designed that way. And some type systems are, and some type systems are getting there, but boy, trying to retrofit that on top of a type system that has null in the first place is quite an undertaking." -Anders Hejlsberg >Andrew Hejlsberg: >Maybe I'll just add, with language design, you know one of the things that's interesting, you look at all of us old geezers sitting up here, and we're proof positive that languages move slowly. >A lot of people make the mistake of thinking that languages move at the same speed as hardware or all of the other technologies that we live with. >But languages are much more like math and much more like the human brain, and they all have evolved slowly. And we're still programming in languages that were invented 50 years ago. All the the principles of functional programming were though of more than 50 years ago. >I do think one of the things that is luckily happening is that, like as Larry says, everyone's borrowing from everyone, languages are becoming more multi-paradigm. >I think it's wrong to talk about "Oh, I only like object oriented programming languages, or I only like imperative programming, or functional programming". >It's important to look at where is the research, and where is the new thinking, and where are new paradigms that are interesting, and then try to incorporate them, but do so tastefully in a sense, and work them into whatever is there already. >And I think we're all learning a lot from functional programming languages these days. I certainly feel like I am. Because a lot of interesting research has happened there. But functional programming is imperfect. And no one writes pure functional programs. I mean, because they don't exist. >It's all about how can you tastefully sneak in mutation in ways that you can better reason about. As opposed to mutation and free threading for everyone. And that's like just a recipe for disaster. And these Larry Wall and James Gosling and Guido van Rossum quotes: >James Gosling wants to punch the "Real Men Use VI" people. "I think IDEs make language developers lazy." -Larry Wall >"IDEs let me get a lot more done a lot faster. I mean I'm not -- I -- I -- I -- I -- I'm really not into proving my manhood. I'm into getting things done." -James Gosling >"In the Java universe, pretty much everybody is really disciplined. It's kind of like mountain climbing. You don't dare get sloppy with your gear when you're mountain climbing, because it has a clear price." -James Gosling >"I have a feature that I am sort of jealous of because it's appearing in more and more other languages: pattern matching. And I cannot come up with the right keyword, because all the interesting keywords are already very popular method names for other forms of pattern matching." -Guido van Rossum Also: https://news.ycombinator.com/item?id=19568860 https://news.ycombinator.com/item?id=19568860 DonHopkins 10 months ago [-] >Anders Hejlsberg also made the point that types are documentation. Programming language design is user interface design because programmers are programming language users. >"East Coast" MacLisp tended to solve problems at a linguistic level that you could hack with text editors like Emacs, while "West Cost" Interlisp-D tended to solve the same problems with tooling like WYSIWYG DWIM IDEs. >But if you start with a well designed linguistically sound language (Perl, PHP and C++ need not apply), then your IDE doesn't need to waste so much of its energy and complexity and coherence on papering over problems and making up for the deficiencies of the programming language design. (Like debugging mish-mashes of C++ templates and macros in header files!)
- echelon 5y agoStroustrup is brilliant. Even his books on C++ are well written. The problem is that C++ treats humans as smart, whereas a language like Rust treats humans as fallible. This is probably the most important and impactful paradigm shift in language design in the last few decades. Make a language for when people are weak.
- Apocryphon 5y agoThere ought to be a similar “interview” with Chris Lattner on the origin of Swift. And ditto for any other widespread recent languages.
- ldayley 5y agoFWIW Marco Arment and others interviewed Lattner in 2017 about the language in a podcast: https://atp.fm/205 https://atp.fm/205
- Apocryphon 5y agoThat's not an "interview". That's just an interview.
- deleted 5y ago[deleted]
- bajsejohannes 5y agoMirror, since the link is down for me: https://web.archive.org/web/20211031161220/http://harmful.cat-v.org/software/c++/I_did_it_for_you_all https://web.archive.org/web/20211031161220/http://harmful.ca...
- udia 5y agoPrevious discussion: https://news.ycombinator.com/item?id=8410868 https://news.ycombinator.com/item?id=8410868
- dang 5y agoThanks! Macroexpanded: Bjarne Stroustrup: “I Did It for You All [Your Salaries] ” - https://news.ycombinator.com/item?id=29236906 https://news.ycombinator.com/item?id=29236906 - Nov 2021 (3 comments) Bjarne Stroustrup: “I did it for you all” (1998) - https://news.ycombinator.com/item?id=8410868 https://news.ycombinator.com/item?id=8410868 - Oct 2014 (3 comments)
- jkingsman 5y agoA snapshot from October: https://web.archive.org/web/20211031161220/http://harmful.cat-v.org/software/c++/I_did_it_for_you_all https://web.archive.org/web/20211031161220/http://harmful.ca...
- clircle 5y agoFake, but very funny
- hahamrfunnyguy 5y agoShould have (1998) in the title.
- jolmg 5y agoThat date is probably part of the story. The page first appeared on the WayBackMachine in 2007. I imagine it was written then.
- buescher 5y agoIt was old already in 1998 - there's a 1998 post of it in comp.lang.c++ and the first response was "Hoah, not again....when will this thing die...." https://groups.google.com/g/comp.lang.c++/c/rEWz7gBYys4/m/JFdhNNQSEMsJ https://groups.google.com/g/comp.lang.c++/c/rEWz7gBYys4/m/JF...
- Jtsummers 5y agoI didn't know it was that old. There's a 1997 article that is in a similar vein, basically saying that Ada was created to slow down software development for the Soviets by bogging them down in creating an Ada compiler and using Ada: I have a feeling we're not in emerald city anymore by Henry G. Baker, https://dl.acm.org/doi/10.1145/254459.254465 https://dl.acm.org/doi/10.1145/254459.254465 I've been looking for a few minutes for a public copy or transcription, because I doubt I read it in ACM's digital library (though I may have when I was in college). I wonder how much it may have influenced this Stroustrup "interview".
- smorrow 5y agoBruce Ellis knows who wrote it, so he might also know the year.
- b20000 5y agoalthough this is funny, there are some important points in this article to keep in mind.
- 0xdeadbeefbabe 5y agoOne of them is that the reporter used to program mainframes. What are the others?
- b20000 5y agothe point that companies are looking for ways to create a supply of cheap code monkeys so they can pay everyone in the industry less. they do this by creating their own training programs and selling the idea you don’t need a college degree. they then also make sure that you cannot get hired if you have one, by requiring you take leetcode style interviews. this way they can give priority to those who took their programs, without getting sued for discrimination. this limits the number of highly paid people coming in. and everyone is falling for it and doing these stupid code interviews instead of saying no.
- flohofwoe 5y agoMostly agreed, except that a college degree really isn't needed. There are a lot of successful programmers around who taught the craft to themselves as kids on their home computers, or in computer clubs.
- b20000 5y agodepends on what it is you are doing. college is about a lot more than becoming a programmer.
- sumanthvepa 5y agoThis week I had the opportunity of revisiting C++. I had not used it in a project in nearly twenty years and I found modern C++ an absolute joy to use. Of course it is still blazingly fast. But now I could build a complete app with no explicit memory management at all. Lamdas are a joy to use and integrate cleanly with STL and boost. Compiler error message are now much much better. Cross platform compatibility was awesome. The same program compiled cleanly with VC++ clang on MacOS and GCC on Linux cleanly. Finally there is a ton of documentation on every weird nuance of the language just a web search away. Both CPP reference and MSDN are just amazing. Overall I’m really happy with how much progress the language and tools have made.
- whatroot8 5y agoI’m using it for the first time and have been wondering what all the horror stories are about. But then realize those horror stories were from 15+ years ago. Did we need Rust? Or did we need to build out the C and C++ ecosystems to make them easy and safe? How many hours spent on all these languages for a few folks to build fiefdoms upon? Every human endeavor has a group of swindlers that tell you they’re helping but in hindsight often looks like they just got in the way.
- Kototama 5y agoMultithreaded C++ programming without bugs is still very hard. There was an interview on Mozilla and why they started Rust and everytime they had some path in the code with threads, they found some concurrency issue. I can't find the link right now. Edit: I think it's in this podcast https://corecursive.com/013-rust-and-bitter-c-developers-with-jim-blandy/ https://corecursive.com/013-rust-and-bitter-c-developers-wit...
- PaulDavisThe1st 5y ago> Multithreaded C++ programming without bugs is still very hard. Multithreaded programming without bugs is hard in any language, unless the language completely cripples your ability to do certain things that tend to be where the bugs can creep in. If you religiously stick to the rules (e.g. mutexes around all variable use, mutexes and condition vars used correctly), you will not have bugs. The problems come because people do not religiously stick to the rules, because their language doesn't require them too. The problem is that if you are forced to follow all the rules, then certain things become impossible, such as lock-free programming (even the simple single-reader, single-writer FIFO). The use of memory barriers to create provably safe lock-free code is outside the scope of regularized multithreaded programming, and since it's very very hard to get that write, but people want to try it anyway, that's where things go wrong. Just use things the way you're supposed to and you won't have bugs with this.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- Kototama 5y agoOne could almost replace C++ by Scala and C by Java in the text :-)
- marcodiego 5y agoI'd disagree about C. It is just too simple to look like something deliberately created to write unmaintainable code. Although we know it is not only possible, but actually common.
- formerly_proven 5y agoC looks simple, but isn't.
- mirekrusin 5y ago(FAKE) in the title maybe [0] as it's not 1st of April today? [0] https://www.stroustrup.com/bs_faq.html#IEEE https://www.stroustrup.com/bs_faq.html#IEEE
- neilv 5y ago> There was this Oregon company - Mentor Graphics, I think they were called - really caught a cold trying to rewrite everything in C++ in about ‘90 or '91. This reminded me of the very first industry conference I attended as a kid, Usenix C++ 1992, from where I seemed to recall a talk about Mentor dealing with static initializer costs. :) https://archive.org/details/1992-proceedings-c-portland/page/170/mode/2up https://archive.org/details/1992-proceedings-c-portland/page... I remembered that paper about a decade later, when a related problem came up in an interview at a company developing a new Web-oriented programming language, when they were talking technical about how they do program loading. It turned out they had indeed anticipated and/or run into that, and had a clever solution for it, and seemed impressed that I'd asked about it (thanks to the Usenix C++ paper by John F. Reiser from Mentor Graphics).
- atemerev 5y agoThis is a known April's fool joke: why posting this here at face value?
- disintegore 5y agocat-v.org, now that's a domain I haven't seen in a while. Crazy how I used to agree with everything these people (and the suckless.org folks) said and now I'd strictly avoid working with anyone like that.
- mburee 5y agoCan you share your reasons for that? I feel like I'm in the same boat now you used to be in. But also mainly because I really like Plan9.
- kaba0 5y agoBecause they are crazy people. Just look at this list: http://harmful.cat-v.org/software/ http://harmful.cat-v.org/software/
- mburee 5y agoI kinda agree though. Maybe not on their political stuff, but...
- kaba0 5y agoYeah, we would definitely be ahead by using tcc instead of gcc (who cares about running optimized code anyway? Smh), PDF is harmful so use PS? They are not even competing projects. SQL database as harmful? Wtf. Vim is harmful? Like, they should just fking quit CS if they are afraid of complexity - because due to many interesting problems having an essential complexity way higher than the very low bar they can understand, they can’t really produce anything worthwhile.
- marcodiego 5y agoTo simplify the task of refuting this hoax once again every time it resurfaces, I just created a new subsection on Stroustrup wikipedia article about it: https://en.wikipedia.org/wiki/Bjarne_Stroustrup#The_recurrent_rumor_about_why_C++_was_developed https://en.wikipedia.org/wiki/Bjarne_Stroustrup#The_recurren...
- bborud 5y agoI bet there's a social anthropology or psychology paper somewhere in there explaining how for some people this isn't obvious.
- spfzero 5y agoPretty easy to discern that it is fictional, no need to refute anything.
- handoflixue 5y agoWe have "Poe's Law"; we've seen numerous people being caught making overly-candid remarks in various contexts; numerous people caught posting to main instead of their sock-puppet... and that's before we get in to the difficulty of recognizing satire when it's not your native language, etc. We know people say absurd things, so there is absolutely a need to clearly mark satire/humor
- scj 5y agoThe word hoax isn't correct. This is satire. A parody based on Stroustrup's many defenses of C++. It makes me laugh every time I read it. Some day, hopefully many years from now, I suspect someone will write "Bjarne's Deathbed Confession" with the exact same premise, just updated.
- 2-718-281-828 5y agoYou "just" created something on Wikipedia and it hasn't been removed, yet? I thought this is impossible.
- 5y ago
- lorenzotenti 5y agoVery fun but not true, https://www.stroustrup.com/bs_faq.html#IEEE https://www.stroustrup.com/bs_faq.html#IEEE
- moffkalast 5y agoThat's exactly what he'd say though isn't it? The funny part about it is that one can never tell if it's true or not.
- alex_smart 5y ago"I wonder what would happen, if there were a language so complicated, so difficult to learn, that nobody would ever be able to swamp the market with programmers?" Why would anyone say that about a language they designed?
- moffkalast 5y agoI mean, writing shitty unmaintainable code for job security is not an uncommon thing, so this is the logical next step. Why not?
- alex_smart 5y agoI mean, duh.
- Typhon 5y agoI thought it would have been obvious to anyone that this is satire, but then again I know that it was explicitly presented as such the first time I read this text so I'm probably biased.
- taneq 5y agohttps://en.wikipedia.org/wiki/Poe%27s_law https://en.wikipedia.org/wiki/Poe%27s_law Was the first thing I ctrl+f'd for, the second being 'satire' and here we are. Hi! :)
- fhd2 5y agoBit OT, but I think I never had a venue for saying this in public: Stroustrup is absolutely one of the most inspiring programmers I'm aware of, think of C++ what you like. Stuff like const correctness and references were way ahead of its time IMHO, and I always found his talks and writing insightful. Despite the pretty insane success of his creation, and all the hate, he always seemed pretty down to earth and friendly to me - I don't know if a lot of people could have pulled that off in his position. Maybe I'm missing some major flame wars or dramas, but from all I've seen and heard, a very inspiring person.
- krylon 5y agoI try to stay away from C++ (successfully for the most part), but I do recommend Stroustrup's "Design and Evolution of C++". It is a bit dated by now, but it is the best book on the design and evolution of any programming language in general I have come across. (wink If anyone knows of a serious contender, please let me know!) I wish he'd update it to reflect the changes C++ has seen since the book was first published.
- shalabajser 5y agoThe interview is fake, but this story isn't. Years ago, when I still had to earn living by coding in C++, I complained about C++ to a friend of mine who was a well respected university professor. He said: "I know Bjarne. He is a good guy. He didn't do it deliberately." Incidentally, back then I had to write device drivers in C++ - templates, inheritance and all. To preserve my sanity, I wrote a Perl script which converted a simple text file describing device registers into the horrible C++ code sausages.
- locallost 5y agoI'm torn on this. Had to learn (well just the basics) c++ in school and even though I didn't really know anything I wondered if things really need to be that complicated. So I went over to the "dislike c++" group as soon as I figured out one exists. On the other hand, I really enjoyed his c++ book (there are probably many, don't know which one anymore) and from it and the few talks of his I saw I think he's really good at explaining and a good teacher.
- DonHopkins 5y agoIf only people took Bjarne Stroustrup's paper "Generalizing Overloading for C++2000" more seriously and implemented it as part of the official standard, all of C++ usability and complexity problems would have been solved long ago, and C++ programs would all look beautiful and elegant. https://www.stroustrup.com/whitespace98.pdf https://www.stroustrup.com/whitespace98.pdf
- mrich 5y agoModern C++ is nice to use, but there's no way I would use it for a greenfield project. Rust simply gets so many things right and saves you the CPU years you have to spend on ASan/MSan/TSan/UBSan/valgrind and fuzzing just to shake out all the bugs.
- Koiwai 5y ago154 points? come on HN you're better than this.
- taneq 5y agoHe did it all for the nookie <yeah>