[rust-dev] Why focus on single-consumer message passing?

Daniel Micay danielmicay at gmail.com
Sun Jan 26 04:56:52 PST 2014

On Sat, Jan 25, 2014 at 12:31 PM, Patrick Walton <pcwalton at mozilla.com> wrote:
> On 1/25/14 2:48 AM, Daniel Micay wrote:
>> Rust aims to be a systems language displacing C and C++ from their
>> niche. I don't think it's suitable as one with the standard library,
>> and it's not replacement for C without a large library ecosystem.
> As Brian said, this sort of inflammatory, unspecific criticism is not
> welcome. Especially when you are advocating making channels *less*
> performant.
> Patrick

I don't think it's inflammatory or unspecific. Rust's standard library
doesn't follow the pay-for-what-you-use philosophy and pulls in many
megabytes of code via trait objects despite it not be used. It also
forces the bindings to any library making use of thread-local storage
(many!) to use painful context objects, even though it's unnecessary
with 1:1 threading. C++ follows the philosophy of not making you pay
for abstractions you aren't using.

A simple multi-consumer channel is faster than the current Rust
channels with 1:1 threading, so I'm only advocating leaving out a
restricted API until it offers a performance advantage over a default,
unrestricted one.

More information about the Rust-dev mailing list