10 ms·
How I Came to Write D
- chaired 13y ago"I confided this to a colleague, and he suggested a lunch with him and the local C guru" This stood out to me as the #1 difference between me and successful people. I always notice it in every article or bio of someone successful. Something that has never, and would never happen to me at any point in time, but in the bios, it's always there: The first person I mentioned my idea to suggested a lunch.
- eric_cc 13y agoWhy would this never happen to you?
- lelandbatey 13y agoI believe the parent comment is implying that in every biography by someone who does something impressive, there are moments that show the environment they where in. Some things to note about the statement "I confided this to a colleague, and he suggested a lunch with him and the local C guru" 1. He had a colleague to speak to about this issue. This indicates he and the colleague had a relationship conducive to speaking about such problems, and was in a position to speak to him in the first place. 2. That colleague was engaged enough to want to hear more. 3. The colleague knew a "local C guru" and in turn had enough of a relationship with that guru to arrange a lunch between the three of them. All of these things point to an environment that helps foster this kind of work. It shows that the author was hard working enough already to be in that position. I don't know if others interpreted his statement to mean the same things, but that's what I have.
- WalterBright 13y agoNote that experience was entirely negative. Nobody offered to help write any code, invest any money, do any marketing of any kind, etc. Even after I wrote the compiler and was shipping it, a different colleague asked me one day: "Walter, I have a friend that needs a C compiler. Which one do you recommend?" Me: "Why, mine (Datalight C), of course!" Colleague, laughingly, "Not yours, Walter, a real compiler!" A friend of mine, who was in earshot of this little exchange, thought it was most hilarious. If you want to do things like this, you've got to have a pretty thick skin for this sort of "help" from your colleagues.
- 0xdeadbeefbabe 13y agoDon't forget the food they might have eaten: an appetizer of salami and mimolet followed by shwarma with lots of red onions in it. Successful people affirm the consequent [0]. For example, naming your language "D". [0] http://en.wikipedia.org/wiki/Affirming_the_consequent http://en.wikipedia.org/wiki/Affirming_the_consequent Edit: add scholarly footnote and tighten up language.
- ErsatzVerkehr 13y ago"Successful people affirm the consequent" - Not sure what you mean here; you're linking to a description of a logical fallacy.
- jere 13y agoIf you never go to lunch, you can never plan out your idea on a napkin.
- samstave 13y agothere are plenty of napkins at the bar, however ;-)
- mahmud 13y agoAlso, successful people generally tend to have very vast social networks (in the real sense, not Facebook)
- WalterBright 13y agoAnyone who knew me then would laugh at the idea that I had a vast social network. My colleague sat next cubicle over at work.
- deleted 13y ago[deleted]
- puppetmaster3 13y agoLove D, I'm going to SF D conf!
- ybaumes 13y agoI was thinking Andrei Alexandrescu did invent the D language.
- stonemetal 13y agoNope, D hit 1.0 before Andrei got involved in development, or it was at least very close.
- thinkpad20 13y agoNice article! I tried out D a while back and I liked it a lot. I'm not sure I'll pick it back up again but it's certainly a possibility, especially if I feel compelled to write C++ again... yikes. I'm a language geek myself; I'm working on a language, my third so far but this one is the farthest I've yet gotten and I'm really excited about it. One question I have for Walter, when you were writing your compilers (both back in the day, and for D), how much did you just try to figure out yourself, and how much did you rely on literature to guide you? I tend to find it more fun to just try to do it myself, and only turn to literature when I'm really stuck. But obviously there's a bunch of valuable things to be found in books and articles, and they can save you from bad decisions or going down fruitless rabbit holes. As someone who's very experienced in language implementation, do you tend to invent your own algorithms, or rely more on academic and industry literature?
- WalterBright 13y agoI tended to have many amazing insights, only to discover I'd just reinvented the wheel. It's because I do not have an academic comp sci background. I learned how to do data flow analysis by taking a short course put on by Ullman and Hennessy. I learned about GC from the famous GC book. I learned a lot from people who started out saying "Walter, you damned ignorant fool! [...]" I've learned a lot about things that sound like great ideas but just don't work, from bitter experience. I try to pass this stuff on to the next generation, but they are usually determined to make the same mistakes. Oh well.
- zura 13y agoWalter, always wanted to ask you - what do you do for living? Is it something related to D or compilers in general (consulting maybe?). Also interesting if Digital Mars commercial compiler had/has any success.
- deleted 13y ago[deleted]
- WalterBright 13y ago
- panic 13y agoIt's interesting how games have driven the development of computer systems. Unix, for example, was motivated by Ken Thompson's work porting his game Space Travel* to the PDP-7. [*] http://en.wikipedia.org/wiki/Space_Travel_(video_game) http://en.wikipedia.org/wiki/Space_Travel_(video_game)
- deleted 13y ago[deleted]
- haberman 13y agoEnjoyed this a lot. Points I could identify with: - being motivated by people telling you you can't do it. - writing what you need instead of what other people say the world needs. - having a weakness for getting into arguments with people who are "wrong." :) - being inclined to work solo, and being uncomfortable giving up control but realizing at some point that you have to cede some.
- WalterBright 13y ago> being motivated by people telling you you can't do it. I'm saddened by all the stories I see posted here and on Reddit where people are discouraged from doing things by negative remarks from others.
- paulbaumgart 13y agoIt's funny (not really) that the set of people who actually do things and the set of people who reflexively post negative comments on the internet barely intersect, if at all.
- michael_nielsen 13y agoThis has been posted many times, but the words of Teddy Roosevelt bear frequent rereading: "It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming; but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor defeat." The critics often seem to be saying, implicitly, "_I_ could do it better". It's a claim of superiority. I guess it's beguiling, because criticism of this form is so much easier than genuine creation. I think many of the critics don't consciously realize this, since they've never created something of great worth, and have no idea how difficult it is. I've known very accomplished people who could be haters. But usually accomplished people seem to be appreciative of creative projects, and understanding of flaws (while wanting them eliminated). I think it's because they understand just how difficult it is to do good creative work. They know that someone can bring immense gifts and effort to bear on a project, and still have it go awry.
- TsomArp 13y agoWhy do they use a name that would make it almost impossible to search information on it? I can understand "C" on a pre-internet world, but "D" in 2014?
- dllthomas 13y agoWhile your point stands, it was "D" in 2001.
- WalterBright 13y agoGoogling "D language" works just fine. No problems.
- Uhhrrr 13y agoThe name expresses the intent very well, does it not?
- the1 13y agoyah they should've named it Gdheegh.
- deleted 13y ago[deleted]
- jeremiep 13y agoGreat read! I once used D to implement a toy LISP language under a thousand lines including the native and loads of built-in functions. I can't imagine doing it this easily, this cleanly and this performant using either C or C++ (I even had fixnums and clojure-like vectors and maps, although not persistent.) There's a lot of features to learn, and a lot of ways to use them. But the result is something almost as powerful as LISP, almost as safe as Haskell, as low-level as C and even more with inline assembly, and most importantly as productive as Ruby. Definitely a lot to digest as a first language! Congrats on making the top 20 most used languages, well deserved!
- ksrm 13y agoWhat kind of things do people use D for? If there was an ARM compiler I'd use it for embedded work in a (bounds-checked!) heartbeat.
- he_the_great 13y agoThis page lists some: http://wiki.dlang.org/Current_D_Use http://wiki.dlang.org/Current_D_Use Work is happening with ARM, but it needs more pre-early adopters. http://wiki.dlang.org/GDC/Cross_Compiler http://wiki.dlang.org/GDC/Cross_Compiler
- ScottBurson 13y ago[The guru's] contemptuous response is still etched on my brain, "Who the hell do you think you are thinking you can write a C compiler?" I guess this guy never heard of Leor Zolman and the BD Software C Compiler [0] :-) I got a lot of use out of that compiler back in the day, but I can tell you, Leor had no idea what he was doing when he started. [0] http://en.wikipedia.org/wiki/BDS_C http://en.wikipedia.org/wiki/BDS_C
- WalterBright 13y agoLeor's a great guy and is still actively programming.
- ScottBurson 13y agoYeah, he and I traded emails briefly 7 or 8 years ago, I think, but didn't really have that much to talk about. But we go way back -- we were in the same class and same dorm at MIT (before he dropped out and wrote BDS C), and were housemates for about a year c. 1981-82. Ever hear of MINCE? It was a micro-Emacs that first ran on CP/M, later MS-DOS. The first version was developed using BDS C.
- WalterBright 13y agoI've heard of it, but have never used it.
- ScottBurson 13y agoAh. Well, I was one of the founders of Mark of the Unicorn, and helped write MINCE (though most of the credit belongs to my colleagues Jason Linhart and Craig Finseth).
- imthatguyama 13y agoTL;DR: He wants the D.
- rurban 13y agoI loved his Zortech compiler, esp. the nice GUI which beat all others, but mostly his C library which came with it. I used a lot of his libraries for while, until I decided that C/C++ is a dead end. With D he found his mojo, but people are still raving about Rust and are still mostly ignoring Walter. Big thanks to Facebook for deciding on D. Only ObjC came close but D is better.
- skrebbel 13y agoReading this article and the HN comments, I'm realising something nice: to me, Walter Bright was always up there with the unapproachable gurus of programming. Clearly, he doesn't see himself like that at all, which is a very encouraging thing to realise. It's nice to be reminded that many people I look up to are really just down here, feet on the ground, and that maybe I could accomplish similarly great things by just (keeping) giving it a go.
- visakanv 13y agoThis is surprisingly the case for lots of craftsmen in all fields. You may enjoy The Mundanity Of Excellence, by Daniel Chambliss, about how ordinary Olympic swimmers actually are. http://www.visakanv.com/blog/2014/01/the-mundanity-of-excellence-by-daniel-chambliss/ http://www.visakanv.com/blog/2014/01/the-mundanity-of-excell...
- timClicks 13y agoSad reminder of Ian Thorpe. I hope he gets through his illness, although I hear it's unlikely that he'll swim again.
- abdulhaq 13y agoReading the D forums you see how friendly and approachable he really is. Hand in hand with that is great patience, I'd say. Where I fall down is that without encouragement I'm not a 'completer-finisher'. Walter has that great ability to grind out the finished quality product. I love D for its expressiveness and speed, here's hoping it wins out.
- abhgh 13y agoI have a bachelors in mech engg. I eventually moved to software and Walter Bright exactly echoes why: My degree was in mechanical engineering. But mechanical engineering was frustrating because of the large expense involved with building anything ... With programming, on the other hand, I could build the most intricate machines imaginable at no expense, needing only access to a computer.
- scriptproof 13y agoI had a rather critical view of D at first. Another C like again, we never get rid of these bracket-oriented languages! Then came Go and Rust, and my opinion has changed, I see it more favorably, as it does not seem to be the worst of them.
- nnq 13y agoHow would one compare/contrast D vs. Rust? Both concerning the problems they try to solve / the niches they target, and the way they choose to solve them. I almost never heard/read something about Rust from a D developer and the other way around, it's a bit like they live in different parallel universes :) There was an interesting discussion on a golang thread about Go vs C++ vs D, with great insights in conversation between Andrei Alexandrescu and some of the Go guys (can't remember where to look for the link right now...), but it only made clear the fact that Go and D target very different niches and it was basically an apples to oranges comparison... but D and Rust would be an interesting comparison, they really are in the same "zone" but the communities seem very different and each seems not to know or care about what the others are doing (there was a Rust guy on that thread mentioning the way Rust uses the pointer types system for memory safety and the others were something a long the lines of "can a type system really be used for that?!" that clearly suggested the two groups didn't share their ideas a lot). EDIT+: this might be the link to the thread I was referring: https://groups.google.com/forum/#!topic/golang-nuts/8k59RgkeJ6s https://groups.google.com/forum/#!topic/golang-nuts/8k59Rgke...
- pjmlp 13y agoI guess it is a matter of how both communities look into the problems. Currently I spend more time on D forums than Rust ones, and to be honest given my type of work I can only use JVM/.NET/C++ languages, as customers have the last word. However as language/compiler geek I do follow many discussions. Trying to avoid a flamewar here. D has a GC and follows the school of thought from Cedar, Oberon, Modula-3 and so forth, where it is assumed you can have a systems programming language with GC, which also allows for manual allocation when required to do so. Still room to improvement there in terms of performance, though. Rust leaves GC to the library, at the expense of a complexer type system as a means to allow the compiler to reason about automatic memory usage. Both provide very powerful and modern abstraction mechanisms. Which one is better? I think it is a question of use cases.
- kibwen 13y agoRust and D will largely inhabit the same conceptual space (both can easily be used to write efficent, low-level programs) but their individual styles are so different that I think in practice any given programmer will have a clear preference for one or the other, with little overlap between the communities. Rust has an overriding emphasis on guaranteeing memory safety and correctness, and when the programmer must resort to potentially unsafe code it isolates the unsafe portions of the source code so that they can be more easily audited by hand and thoroughly tested. It specifically incorporates safety features with zero runtime overhead (with the exception of array bounds checking, which can be turned off on a case-by-case basis) in order to appeal to C++ programmers who need to work close to the metal. D also emphasizes greater safety than C++, but not to the fanatical degree that Rust does. D smooths and streamlines the experience of writing C++-level code and favors expressiveness, with especially impressive compile-time programming abilities. The most important conceptual division between D and Rust is that D guarantees memory safety via garbage collection (which can be disabled, at the cost of losing memory safety), whereas Rust guarantees memory safety via compile-time checks (which makes Rust code less convenient to write, since it forces you to think about the lifetimes of your data, but provides the benefits of memory safety in environments where GC overhead is unacceptable or where the code must run without an accompanying runtime present). Both languages share many similarities to C++, but this is merely convergent evolution. D deliberately began with a very strong C++ influence, whereas Rust began as more of an OCaml-like language and gradually evolved toward C++ due to the pressures of designing a production-grade systems language. The result is that Rust favors ideas more prevalent in functional languages: immutability-by-default, algebraic data types, everything-is-an-expression, and so on. A good oversimplification might be something like: D was conceived by people who were tired of how clunky C++ is. Rust was conceived by people who were tired of how unsafe C++ is.
- developer786 13y agototally off topic, but programmers, I need your help... https://news.ycombinator.com/item?id=7559067 https://news.ycombinator.com/item?id=7559067