6 ms·
Bjarne Stroustrup on Dennis Ritchie: They said it couldn't be done, & he did it
- mhartl 15y agoThe title is a bit misleading: there's a quote from Stroustrup in the post, but the author of the article is Herb Sutter.
- toyg 15y ago"C is a poster child for why it’s essential to keep those people who know a thing can’t be done from bothering the people who are doing it." Being a "can't be done" person is easy, being a "I'll do it" person is hard... but it's so much more fun and liberating. True story.
- randomdata 15y agoI certainly cannot speak for Mr. Ritchie, but when someone says it "can't be done" to me, it provides me with even more incentive to prove them wrong. If nobody was bothering him with "it can't be done," maybe it would have never been done?
- steve8918 15y agoHow many times throughout history have we heard this? I think that this is probably the most important part in any huge discovery throughout history, people refusing to believe or not knowing that it that it "can't be done". (Of course the trick is knowing when something really can't be done, ex. alchemy)
- T-hawk 15y agoAlchemy can be done. Gold has been synthesized on the nuclear level by way of neutron bombardment of other elements. It's just not economically practical since the process costs more in equipment and energy than the value of the gold. http://en.wikipedia.org/wiki/Synthesis_of_noble_metals#Gold http://en.wikipedia.org/wiki/Synthesis_of_noble_metals#Gold
- derleth 15y ago> Alchemy can be done. Only by dishonestly redefining your terms. Alchemy was always focused on chemical methods. Converting lead to gold that way is impossible.
- chc 15y agoI think "dishonestly" is a little strong (though yes, alchemy was an early branch of chemistry).
- T-hawk 15y agoRight, and finding another way is how the "can do" person wins over the "can't" naysayers. It's like saying Jules Verne's cannon to the moon is impossible... which is true, but not really the point, since rocket travel to the moon has been proven.
- derleth 15y agoMy point is that you can make any prediction 'come true' if you redefine enough words in it. This is a dumb parlor trick and tells us nothing about how people of the past actually thought.
- jerf 15y ago"Alchemy" predates meaningful definition of the word "chemical"! If you had presented them the modern solution, they would not have been so inclined to split hairs. They were looking for any way, regardless of whether it was "chemical" or "nuclear" or magic for all they cared.
- zipdog 15y agoAnd yet, without all the efforts that went into alchemy (including Newton) we might have been delayed getting chemistry among other fields. (I've been reading Gleick's bio on Newton, and it makes a point about the impact that the 'fruitless' alchemy had on modern science.. the real mistake of the alchemists was being secretive about methods and results)
- pnathan 15y agoWhat a wonderful tribute to a pioneer in our field.
- beza1e1 15y agowe now have the new ISO C11 standard. C11 includes a number of new features that parallel those in C++11 Did i miss something?
- pavlov 15y agoISO C11 has been known as "C1x" until its standardization: http://en.wikipedia.org/wiki/C1X http://en.wikipedia.org/wiki/C1X Nothing earth-shaking. The _Generic keyword is probably the most exotic addition (at least among those listed on the Wikipedia page) -- it's basically switch(typeof(X)) for macros.
- derleth 15y agoIs there a reason C11 doesn't include typeof? It's been a gcc extension for decades now, and I see no reason it can't be part of the official standard.
- nitrogen 15y agoMy guess as someone who is not familiar with compiler internals is that the design of many compilers prevents them from implementing a typeof() operator without major changes to the way they analyze and store the parsed source code, so the standard writers decided not to include a feature that would not be widely implemented. But, using _Generic(), one can do many of the things one would do with typeof(). For example, the max() example in [0] could probably be implemented using at most n^2 separate macros plus a _Generic() macro for each type, where n is the number of arithmetic types (though I think you'd still need GCC's statements within expressions in order to evaluate A and B only once). I'm thinking something like this that combines the cbrt(X) example from the C1x spec [1] (§6.5.1.1 paragraph 5) with the gcc max() example, though I haven't tested it, and it could almost certainly be simplified by exploiting type promotion rules: #define max_ld_ld(A, B) ({long double _a = (A); \ long double _b = (B); _a > _b ? _a : _b}) #define maxld(A, B) _Generic((B), \ long double: max_ld_ld, \ int: max_ld_i, \ /* etc. */ \ )((A), (B)) #define maxi(A, B) _Generic((B), \ long double: max_i_ld, \ int: max_i_i, \ /* etc. */ \ )((A), (B)) #define max(A, B) _Generic((A), \ long double: maxld, \ int: maxi, \ /* etc. */ \ )((A), (B)) [0] http://gcc.gnu.org/onlinedocs/gcc/Typeof.html http://gcc.gnu.org/onlinedocs/gcc/Typeof.html [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf OT P.S. It is very annoying that Google has broken right-click+copy URL.
- evincarofautumn 15y agoThe opening sentence bothers me. “Rob Pike reports that Dennis Ritchie also has passed away.” (Emphasis mine.) As though he’s just some kind of footnote in light of the death of Steve Jobs! Both Jobs and Ritchie were “I don’t care if it’s impossible, I’m doing it” types, but I feel that Ritchie contributed more to computing as a whole, while Jobs’s innovations were mainly in user experience.
- eropple 15y agoYou're being overly sensitive. Jobs passed away first, and was remarked on first.
- evincarofautumn 15y agoI just think individuals should be treated individually.
- groby_b 15y ago"C is a poster child for why it’s essential to keep those people who know a thing can’t be done from bothering the people who are doing it." C++, on the other hand, is a poster child that just because it can be done, you shouldn't necessarily do it.
- acqq 15y agoALGOL had almost everything that C had including portable types at least 10 years earlier: http://en.wikipedia.org/wiki/ALGOL http://en.wikipedia.org/wiki/ALGOL and really innovative guys, Burroughs computers had their operating system written in an ALGOL dialect: http://en.wikipedia.org/wiki/Burroughs_Corporation http://en.wikipedia.org/wiki/Burroughs_Corporation all before C. Personally I appreciate the terseness of C and its closeness to assembly a lot, and I believe it all reflects the good taste of Ritchie, but still he didn't do anything "impossible" from my perspective. To compare, you can read again: "The Summer Of 1960 (Time Spent with don knuth)" http://news.ycombinator.com/item?id=2856567 http://news.ycombinator.com/item?id=2856567 where Knuth writes an ALGOL compiler for Burroughs in 1960 working 40 hours a week in violation of Cal Tech's policy that limits the number of hours that a Ph.D. candidate can work.
- kragen 15y agoYou are mistaken. From the article: > There was no such thing > as a general-purpose program that was both > portable across a variety of hardware > and also efficient enough > to compete with custom code written for just that hardware. And that is true. You couldn't run the Burroughs 5000 Master Control Program on a PDP-11, as far as I know, at all, and certainly not efficiently. Ten years before the birth of C was about 1963. ALGOL-60 lacked a lot of things to compete with C, which is why people in the 1970s switched to C. ALGOL-68 required garbage collection, which wouldn't be reasonably efficient until the invention of generational GC in 1983, and still poses problems for real-time software like device drivers, which is why people usually use C or C++ instead of ALGOL-68 or Java for them. For some notes on what ALGOL-60 lacked in comparison with C, I recommend reading "Why Pascal is Not My Favorite Programming Language", from 1981: http://www.lysator.liu.se/c/bwk-on-pascal.html http://www.lysator.liu.se/c/bwk-on-pascal.html. Most of the objections to Pascal also apply to its ancestor ALGOL-60, although ALGOL was intended for real work, not just teaching. ALGOL-60 did have a sort of equivalent of pointer parameters, namely Jensen's Device, but it was dramatically less efficient than pointers. I think (I wasn't around in the 1960s) that ALGOL implementations from different vendors had different nonportable extensions to work around the lack of pointers, and of course the same thing happened with Pascal later. Burroughs was an immensely innovative company, and all of today's popular programming languages except C, C++, and PHP (JS, Java, C#, Python, Perl, Ruby, Objective-C) owe an enormous debt to Smalltalk, which draws much of its inspiration from the B5000. I do not deprecate the importance of Burroughs! They did indeed write the first OS in a high-level language. But C achieved what they could not. The measure of C's achievement is that in 2011, on a multiprocessor 32-bit machine with the x86 instruction set and a gigabyte of RAM, I still occasionally run programs originally written in 1981 for a single-processor 16-bit PDP-11 with 64k of RAM per program, and they're still efficient; and I still constantly run software written in the late 1980s, such as parts of the X server and much of GNU coreutils, on single-processor 32-bit 68000s, and much of the optimization done then is still valid. (Though not all of it!) It was C that first made it practical for people on different architectures to share code on a large scale, for code to outlive the architectures it was written for without suffering a dramatic slowdown, and for people to switch architectures, as Sun did from the 68000-family Sun3 to the SPARC, as everyone eventually did to the i386 we use today, and as we now are to AMD64. The SNOBOL Implementation Language, SIL, achieved the same thing in 1966 — but only for one program, the SNOBOL interpreter! TeX was another early endeavor in this direction; concurrent with the early evolution of C, Knuth wrote WEB, a literate programming language which compiled into Pascal, in order to get Pascal's portability without suffering from its drawbacks. Among other things, WEB used a single humongous Pascal packed array of char for all of its strings; and that was what Knuth wrote TeX and Metafont in. C's twin sibling Ratfor was a third similar approach, compiling C-like constructs into Fortran rather than assembly. I don't know of anything else that predated the popularity of C. In effect, C enabled both the birth of the SPARC and its death. Today we stand at or near the end of the C era, for three reasons. First, a vast amount of software is being written for which efficiency is of minimal concern. So C's drawbacks — its proneness to subtle bugs, its difficulty of debugging, its limited facilities for abstraction — drive people to more modern languages. Second, dynamic recompilation has reached a level of performance where it's feasible to use it to emulate another processor architecture at acceptable speeds. Transmeta was one of the most interesting explorations of this concept, but Apple's transition strategy from the PowerPC to the i386 probably had more field-deployed units, and I think some of the currently popular OS virtualization approaches work this way as well. (And of course there's Valgrind, although calling its speed "acceptable" is a bit of a stretch.) So now there are viable alternatives to the recompilation approach. Third, both computer architectures and compiler optimizations have changed so much in the 40 or so years since C was invented that C is stretched rather thin. Compilers exploiting undefined behavior makes it increasingly difficult to write working code in C, or to recompile old C programs. And, although people largely program GPUs in C, you cannot simply recompile Emacs for your Fermi or your Spartan-II to get it to run faster or use less energy. The C abstract model of computation is an increasingly poor fit to modern hardware, despite the pressure it has exerted on hardware designs for the last 25 years. ๛
- andrewflnr 15y agoAs a young whipper-snapper upstart with some big ideas, this is inspiring. Maybe I'm not quite so crazy after all to think I can pull them off.
- dextorious 15y agoAnd one by me for Bjarne Stroustrup: "They said it shouldn't be done, & he did it". (yeah, a joke. Humor's not only for Reddit).
- to3m 15y agoSadly, Bjarne Stroustrup was the only person not to listen to "them" (whoever they are), and so C++ is all we have. Which sort of justifies his point, really...
- dextorious 15y agoWe'll I'll take Objective-C any day. And if OO is your thing, we'll, we have tons of other options.
- vorg 15y agoLearn Objective-C++ and you can command a salary premium from knowing twice the complexity!