Highest Rated Comments


andralex78 karma

I have to admit my relationship with C++ has lost a fair amount of its romance. We know a lot about each other and we roll our eyes when witnessing once again each other's shenanigans.

I'd be hard pressed to write more books on C++. As a general rule the best driving force behind writing a book is "I feel I have something to say, that I believe is interesting and worth sharing." I do feel this in spades about D, but unfortunately not about C++.

I must add one note though. The C++ community has been very gracious and forgiving with my apostasy. I've continued to be bestowed respect from C++ programmers all over, and I am very appreciative and thankful for that.

andralex77 karma

Not for the time being. However, since recently it's become part of my job description to explore integration of D at Facebook. This is the first time I'm mentioning it publicly. assert(cat !in bag); I have a well-defined plan that is difficult but executable. If things go well, we'll make an announcement in a few months. Otherwise, well, we won't :o).

andralex54 karma

OK, I think most people left the stadium but this has been bugging me so I feel compelled to reply.

"Happy" is frequent enough to make "happiest" very difficult. Probably some of the happiest moments have happened when I had just started. Coding is like heroin - we spend most of our time trying to relive that first high.

I remember moments when I'd run a little program again and again with slightly different inputs just to revel in the joy of having done the proper incantations that make the machine do this and that and the other, like a clumsy but loyal genie. I mentioned I wrote this floppy disk formatter - it gave me a lot of joy to be able to tell it the complicated sequence of things I wanted to get done, to see how it ended up carving magnetized trenches into the physical world.

andralex53 karma

I think Scala and C# are two fine languages. Haskell is a factory of good programming languages research. I've seen a talk on F# and it's been quite impressive - it's amazing what can be done with them reified types.

Generally I have a bias in favor of static types.

andralex47 karma

I knew this was gonna come :o). Virtually everyone in the D community has an appreciation for static if - I have yet to find even a naysayer who's mentioning it as an unsavory aspect of the language.

That isn't a proof, but it is evidence. There's also plenty of evidence that C++ is worse off without it by comparison.

Now, the more debatable aspect is the use of Boolean expressions as constraints. The simple story behind that is that Walter Bright and I were looking at a simple means to constrain instantiation of templates. We had static if, we had compile-time function evaluation, so template constraints were a wonderfully simple and integrated solution within that context - a great "aha!" moment. People love it.

Now, in C++, there's no static if and C++14 is acquiring compile-time evaluation kicking and screaming. Within that language, I can totally understand how the context is less conducive to an appreciation of template constraints the way they're done in D.