-
arielby
ubsan: that's a T-libs issue
-
ubsan
yeah
-
still, very easy to solve
-
arielby
ubsan: it will not be left unsolved obsly
-
ubsan
arielby: obviously :P
-
arielby
we just have to tell the discriminant_value people
-
ubsan
well
-
disc_value is still good for
-
enum Option<T> { None, Some(T) }
-
disc_value(opt) -> 1 if Some, 0 if None
-
I wasn't aware it was used for anything else :P
-
arielby
ubsan: sure
-
but it coincides with C-enum -> int casts
-
so I say it should coincide with them at char, bool
-
ubsan
ah, 'kay
-
arielby
because they are C-enum-like types
-
ubsan
sure
-
that seems fine
-
I'd still like prim_cast to work on c-like enums, bools and chars
-
arielby
and that means 1 intrinsic rather than 2
-
ubsan
turning them into ints
-
arielby
ubsan: what's prim_cast?
-
ubsan
arielby: basically, getting rid of the rest of the uses of as
-
arielby
I see casts as
-
fp->int
-
int->fp
-
fp->fp
-
ubsan
int->int
-
arielby
which are fp operations and should be intrinsics of their own
-
[iu]X->[iu]Y
-
which should be 1/2 intrinsics
-
isize/usize<->ptr
-
and
-
ubsan
that would be overcomplicated
-
arielby
discriminant_value
-
ubsan
imho
-
arielby
3 casts that are FP ops
-
ubsan
you want people to actually use these things
-
arielby
with weird semantics and potential failure
-
ubsan
if it's an FP op, or an as cast, people will use as
-
arielby
ubsan: I say deprecate `as`
-
ubsan
arielby: sure
-
arielby: we're unlikely to ever get rid of it though
-
maybe in 20 years
-
it permeates *all* rust code
-
arielby
ubsan: sure
-
Rust 2.0 should remove old-style macros and `as`
-
`x as f32` is still nicer than `prim_cast(x)`
-
ubsan
arielby: Rust 2.0 is like, 2 years from now...
-
arielby
ubsan: ?
-
ubsan
it allows for much easier switchover
-
arielby
Rust 2.0 is when we accumulate enough deprecated features
-
we want to clear them all
-
ubsan
we don't want python 2->3
-
we want C++11 -> 14
-
arielby
ubsan: C++11 -> 14 is not a breaking change I think
-
so it is Rust 1.X -> 1.Y
-
ubsan
yes it is
-
C++14 -> C++17 is also a breaking change
-
but a *minor* breaking change
-
arielby
ubsan: macros are widely used
-
ubsan
macros 1.0 will not be taken out in Rust 2.0
-
arielby
then why will we need Rust 2.0?
-
ubsan
struct dropping order
-
for one
-
other reasons too
-
taking out deprecated things is a big one
-
stuff that's been deprecated in stdlib
-
arielby
ubsan: I think we allowed ourselves to change struct dropping order in a minor
-
we did worse things
-
Python does these kinds of things in minors
-
ubsan
arielby: we allowed ourself
-
but we have to allow for back-compat
-
#[struct_drop_forwards]
-
or something
-
then in 1.0, we remove it
-
err
-
2.0
-
so everything drops backward
-
arielby
ubsan: I think rolling deprecation might be a better model
-
so you deprecate for like 10-20 minors
-
and then remove
-
ubsan
arielby: but rust != rustc
-
you have to think about multiple compilers
-
ubsandroid joined the channel
-
arielby
ubsan: but we sync lang changes with the compiler
-
ubsan
arielby: we won't be able to once mrustc gets up and running
-
and we *really* won't be able to once grustc gets up and running
-
arielby
I still want rolling deprecation
-
and I won't use names like "Rust x.0" for something with that
-
ubsan
arielby: well, look at C++
-
arielby
ubsan: its called C++11/C++14/C++17
-
ubsan
you get deprecation for 3 year cycle, then removed in the next
-
exactly
-
arielby
so it is like minors
-
time-based
-
ubsan
yeah
-
that's what I want
-
because it's worked in a language we're *very* similar to
-
arielby
and it's also a postspecification
-
GCC released in 2010 supports most of C++11
-
like that
-
ubsan
right
-
but removals come after standards
-
you test in compilers and then standardize; then you deprecate and remove from the standard, then remove from compilers
-
like, stabilization wouldn't be a thing; you'd standardize and it'd become stable
-
arielby
ubsan: so if you have 120-week cycles
-
it is like
-
Rust 1.0X
-
Rust 1.2X
-
Rust 1.4X
-
where, say, rustc 1.32
-
no
-
geemili joined the channel
-
rustc 1.52
-
supports everything from Rust 1.4X
-
ubsandroid has quit
-
supports some things from Rust 1.6X under feature flags
-
and supports all features deprecated in Rust 1.4X, but not features deprecated in 1.2X?
-
ubsan
yeah, basically
-
arielby
except we might call them "Rust 2017" instead of Rust 1.2X
-
ubsan
except that I'd argue it should be Rust 3.0, Rust 4.0, and Rust 2.0
-
or that, sure
-
arielby
I don't like going in major versions like that
-
ubsan
naming ¯\_(ツ)_/¯
-
that's fine
-
s/I'd argue/I'd rather/
-
that's not the important thing tho
-
the important thing is what it means
-
arielby
so we can deprecate, say, old-style macros in standards
-
and then if no-one uses it
-
we may remove it from Rust 2021 or whatever
-
ubsan
yeah
-
and then the compiler probably supports it until 2024
-
or might support it forever
-
if it does -std=17
-
or w/e
-
arielby
ubsan: eh
-
ubsan
or you might just do MSVC model
-
arielby
I thought that each Rust compiler version
-
has 1 "standard" mode and 1 "draft standard" mode
-
ubsan
arielby: the important thing is each compiler gets to choose for itself
-
arielby
but nothing prevents us from having an "old standard" mode
-
ubsan
you can either be gcc or msvc
-
(support everything from the beginning of time or only support the latest thing)
-
there are benefits and drawbacks to each approach
-
arielby
Rust is currently MSVC
-
ubsan
yep :)
-
which is good, because it's easier to support new features
-
SilverKey joined the channel