Conversation

I like Swift's `a..b` and `a..<b`. Rust got it round the wrong way. If you want to use the equals sign then I only accept `a=..=b` and `a=..<b`, but now it looks like I've got weird smileys everywhere.
1
1
I would love to see a gradual migration in Rust to Swift's approach over multiple editions (via your proposal), but I doubt there's any energy to spare for that.
1
My experience is that half-open ranges are most useful for slicing and closed ranges are most useful for matching/parsing. For example, you it's not even obvious how one would represent 'a'..'z' (the class of english alphabet characters) with a half-open interval.
1
2
Show replies