5 ms·
Would be great, but the situation is a bit different. Google creates Go. Mozilla creates Rust. Facebook employs one of the designers of D.
by simendsjo 13y ago
Would 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.
- pcwalton 13y ago> 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. Nit: It's not just memory leaks, it's memory safety in general. Leaks are actually somewhat less of a problem than issues like use-after-free, because leaks are usually not exploitable, but use-after-free can easily lead to exploitable security vulnerabilities (for example, the one that brought down Chrome a couple of days ago). In general, only Rust is designed to allow totally memory-safe usage without a garbage collector.
- pjmlp 13y agoWhat you present as new paradigms are features of many languages languages, that any compiler design scholar could present examples of. They are only new paradigms for those that only know mainstream programming languages released after 2000. Go is a nice example of how new it really is: http://cowlark.com/2009-11-15-go/ http://cowlark.com/2009-11-15-go/