[rust-dev] Modest proposal: Make `pub` the default everywhere, possibly remove it

2013-05-29 Thread Gábor Lehel
Hello list, Currently Rust has different default visibilities in different places: - `mod` items are private - `struct` fields and `enum` variants are public - `trait` methods are public - `impl` methods are private - `impls for` are public (by necessity) I propose to change this to: -

Re: [rust-dev] Modest proposal: Make `pub` the default everywhere, possibly remove it

2013-05-29 Thread Mikhail Zabaluev
Hi, I have a strong point against it: your crates are going to be christmas trees of exposed APIs unless you are careful. This has a runtime cost, increases the risk of breaking the ABI more often than you should, and often results in unintentional APIs that you may be later beholden to maintain.

Re: [rust-dev] Modest proposal: Make `pub` the default everywhere, possibly remove it

2013-05-29 Thread Patrick Walton
On 5/29/13 2:18 PM, Gábor Lehel wrote: Hello list, Currently Rust has different default visibilities in different places: - `mod` items are private - `struct` fields and `enum` variants are public - `trait` methods are public - `impl` methods are private - `impls for` are public (by necessity)

Re: [rust-dev] Modest proposal: Make `pub` the default everywhere, possibly remove it

2013-05-29 Thread Gábor Lehel
Maybe I'm unusual. But in C++ I'm always super-careful (one might say anal retentive) about keeping my headers as clean of implementation details as humanly possible. I don't think forgetting a `priv` would ever be an issue. But I'm not everyone. On Wed, May 29, 2013 at 11:34 PM, Mikhail Zabaluev

Re: [rust-dev] Modest proposal: Make `pub` the default everywhere, possibly remove it

2013-05-29 Thread Graydon Hoare
On 13-05-29 02:40 PM, Gábor Lehel wrote: Maybe I'm unusual. But in C++ I'm always super-careful (one might say anal retentive) about keeping my headers as clean of implementation details as humanly possible. I don't think forgetting a `priv` would ever be an issue. But I'm not everyone.

Re: [rust-dev] Modest proposal: Make `pub` the default everywhere, possibly remove it

2013-05-29 Thread Mikhail Zabaluev
Hi, 2013/5/30 Gábor Lehel illiss...@gmail.com Maybe I'm unusual. But in C++ I'm always super-careful (one might say anal retentive) about keeping my headers as clean of implementation details as humanly possible. I don't think forgetting a `priv` would ever be an issue. But I'm not everyone.

Re: [rust-dev] Modest proposal: Make `pub` the default everywhere, possibly remove it

2013-05-29 Thread Gábor Lehel
On Wed, May 29, 2013 at 11:53 PM, Graydon Hoare gray...@mozilla.com wrote: On 13-05-29 02:40 PM, Gábor Lehel wrote: Maybe I'm unusual. But in C++ I'm always super-careful (one might say anal retentive) about keeping my headers as clean of implementation details as humanly possible. I don't