On Feb 21, 2014, at 12:20 PM, Brian Anderson <[email protected]> wrote:
> On 02/19/2014 02:37 AM, György Andrasek wrote: >> On Wed, Feb 19, 2014 at 1:40 AM, Brian Anderson <[email protected]> >> wrote: >>> Backwards-compatibility is guaranteed. >> Does that include ABI compatibility? >> >>> Second, the AST is traversed and stability index is propagated downward to >>> any indexable node that isn't explicitly tagged. >> Should it be an error to use lower stability internally? >> >>> By default all nodes are *stable* - library authors have to opt-in to >>> stability index tracking. This may end up being the wrong default and we'll >>> want to revisit. >> Oh dear god no. `stable` should be *earned* over time, otherwise it's >> meaningless. The compiler should treat untagged code as `unstable`, >> `experimental` or a special `untagged` stability and accept that level >> by default. >> > > OK, I agree let's start all code at `#[experimental]`. It's not too much > burden for authors that don't want part of it to put an attribute on their > crates. What's the default behavior with regards to calling #[experimental] APIs? If the default behavior is warn or deny, then I don't think we should default any crate to #[experimental]. I'm also worried that even if we default the behavior to allow(), that using #[experimental] is still problematic because anyone who turns on #[warn(unstable)] in order to avoid the unstable bits of libstd will be bitten by warnings in third-party crates that don't bother to specify stability. Could we perhaps make the default to be no stability index whatsoever, so third-party library authors aren't required to deal with stability in their own APIs if they don't want to? This would have the same effect as defaulting to #[stable], which was the original suggestion, except that it won't erroneously indicate that APIs are stable when the author hasn't made any guarantees at all. If we do this, I would then also suggest that we default to either #[warn(unstable)] or #[warn(experimental)], which would then only complain about first-party APIs unless the third-party library author has opted in to stability. It's worth noting that I have zero experience with node.js's use of stability, so I don't know how they handle defaults. -Kevin
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
