9 ms·
Google supports Go. Mozilla supports Rust. Facebook should actively support D.
by thepumpkin1979 13y ago
Google supports Go. Mozilla supports Rust. Facebook should actively support D.
- simendsjo 13y agoWould be great, but the situation is a bit different. Google creates Go. Mozilla creates Rust. Facebook employs one of the designers of D.
- smegel 13y agoAnd Go/Rust represent new paradigms whereas D aims to be a less sucky C++...would be interesting to know why Facebook took this approach.
- simendsjo 13y ago"New" paradigms? Care to elaborate?
- keeperofdakeys 13y agoIn brief, all three of Go, Rust and D are designed to replace C++. Go is built around concurrency, so applications you write are almost instantly parallelisable. It uses a simple garbage collector, to make it easier to program. It was developed at Google, with none other than Rob Pike being involved. http://golang.org/doc/faq http://golang.org/doc/faq. Rust is designed to help prevent memory leaks, while still enabling manual memory management. https://github.com/mozilla/rust/wiki/Doc-language-FAQ https://github.com/mozilla/rust/wiki/Doc-language-FAQ. It was written by mozilla, because using C++ for a web browser leaves quite a few memory leaks. Mozilla are also building a prototype browser engine in Rust, called Servo, http://www.mozilla.org/en-US/research/projects/#servo http://www.mozilla.org/en-US/research/projects/#servo. Although its future is still quite uncertain at this point. I haven't had too much contact with D, but from what I understand, it's designed to be C++ done right, while keeping compatibility with many parts of C. http://dlang.org/overview.html http://dlang.org/overview.html
- steveklabnik 13y agoGoogle has been steadily moving away from "Go is a C++ replacement" (because it's not) and toward "Go is a Python/Ruby replacement." (which fits it _much_ better) Also, you're descriptions of Go and D are great, but I'd say that Rust is more "Concurrency of Erlang, speed of C++, type safety of ML/Haskell".
- tptacek 13y agoI'm not sure that this is a distinction (C++ vs. Python replacement) that means all that much.
- steveklabnik 13y agoFor me, it helped me get less mad about Go. ;) A Python replacement accepts that GC is mandatory, while a C++ replacement needs to not have a GC, as the most prominent example of this distinction.
- mjn 13y agoFor some use cases that would matter, but for a lot of C++ use-cases, no GC isn't really fundamental. Large codebases increasingly use the "C++ GC", aka RAII with std::shared_ptr, as the de-facto-standard way of managing memory. For those kinds of applications, how D's GC compares then just becomes a matter of performance tradeoffs between different GC implementations, not a matter of GC vs. no-GC.
- steveklabnik 13y agoAbsolutely. GCs have been improving a lot over recent years, and there's lots of software that's written in C++ that doesn't have to be. You can write D without any GC at all, though: you lose a lot of the standard library at present, but I've done it. It's not possible, in my understanding, to turn the GC off in Go.
- 13y ago
- jnbiche 13y agoLooking back over the D forums, D implementers have been promising to support shared libraries since at least 2006, and as far as I can tell, none of the major D compilers support it yet. D is a very nice language, but without shared libary support in Linux or Windows, its use to me as a low-level alternative to Python or Lua is limited. Go clearly is interested in static-only compilation, and they've said as much. Rust is still too alpha to use for serious projects, and to be frank I find it carries much of the complexity that turns me off from C++ (I really wanted to like Rust). Meanwhile, I've found Nimrod can happily handle shared library support, meaning I can easily make nice extensions for Python and Lua. Nimrod is just as fast as D, and probably a bit faster than Go and Rust. Syntax is very nice for Pythonistas, and it has a very full standard library. I've also noticed that Nimrod is getting some very good exposure here on HN, and people smarter than I am are starting to play around with it (in addition to the people smarter than I am who invented it and brought it to this level). In the end, the only new low-level language without big company support may turn out to be the winner here.
- simendsjo 13y agoShared libraries work on gnu/linux (since 2.063..?), they just haven't been announced (the devs want some "beta" testing first I seem to remember). EDIT: Ok, since 2.064
- WalterBright 13y agoShared libraries are now supported on Linux as of 2.064. Other platforms to follow.
- zanny 13y agoAnd in many ways Microsoft is now supporting C++. Though that language sees a lot more cross pollination between companies because of its ubiquity and age. I find it interesting as a programmer who loves to operate in the space that uses useful abstractions but still is running on raw hardware, as C++ improves rapidly with the new release model since C++11, my interest in D wanes. I hope that most of what D is eventually seeps into C++, but nowadays I don't mind my C++ syntax and don't feel like I'm fighting with it as much.
- cldr 13y agoSame here; I used to be a huge fan of D but then C++11 came along and solved most of my problems (and some that I didn't know D had).
- pjmlp 13y agoThe problem is that when you work on big teams and are forced to work in C++98 with lots of style guide restrictions. Or when management will ever allow for updating the compilers on the build infrastructure. Also compiling C++ code in C++11 mode won't make many developers use Modern C++, instead of C compiled with a C++ compiler, as many still do. Maybe it works for your context, but in a global context we need to have safer languages for systems programming. Which were already available when C didn't had any meaning outside UNIX.
- cldr 13y agoThat's true, but you can write C code in D as well, so switching to D won't make people write idiomatic code either. If they won't learn how to use one correctly then they won't care enough to use another correctly. And if your company won't let you upgrade compilers, then it certainly won't let you switch languages altogether.
- pjmlp 13y ago> That's true, but you can write C code in D as well, so switching to D won't make people write idiomatic code either With a Pascal like type safety. You need to be explicitly mark your code as @system to be allowed to do C like tricks. This alone is a very big advantage.
- jekdoce 13y agoIsn't it better for the community if everyone support the same language and add a lot of solid standard libraries?
- _random_ 13y agoFacebook is the only one smart enough not to invent a new wheel. Not a fan of D though.