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:
-
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.
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)
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
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.
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.
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