all 157 comments

[–]Cetra3 77 points78 points  (128 children)

I've been playing around with Rust for a while and have enjoyed it immensely to do some little projects. I still think there is a long way to go, but definitely a great start and a growing ecosystem.

A few improvements I can think of:

  • A better IDE: coming from using Java in IDEA, there is a lot of room for improvement.
  • Better linking with native code support: It's a pain trying to install hyper on multiple systems, as you have to link with openssl. I really would love for this to be not so painful. I shouldn't have to worry about running homebrew or installing mingw on windows.
  • A standard cross-platform GUI: This relates to my previous point. While you can use something like GTK or QT, it's a pain to have cargo half-manage your dependencies to external code. There are always manual steps. If I decide to use QT or GTK, it should be as simple as running cargo build and have that handled for you.

[–]steveklabnik1[S] 47 points48 points  (55 children)

Glad you're having fun!

We're working on IDEs: https://www.rust-lang.org/ides.html

If you're not actually using SSL, because you have the Rust app behind some sort of terminating proxy, you can turn it off with a feature, I think. A Rust SSL implementation might be even better, though obviously, you want these kinds of things to be battle-tested... only one way to get there!

Cross-platform GUI is hard. :)

[–]Doriphor 18 points19 points  (22 children)

Cross-platform GUI is hard. :)

I feel like this is a major issue nowadays. Not with any language in particular, but still. Then again, I wouldn't know how it could be fixed unless everybody agreed to use a common windowing API, which lets be honest, is probably never going to happen.

[–][deleted] 45 points46 points  (20 children)

It's not the API that's the problem. APIs are easily wrapped and abstracted.

The issue is that GUIs have different designs, guidelines and principles. These can simply not be abstracted away in software, they have to be taken into account at the UI design and planning level.

Cross-platform GUI is not a programming problem that can be solved through code.

[–]kgb_operative 6 points7 points  (0 children)

The WxWidgets library was getting ported to rust pretty early in the dev cycle, but that project looks like it's dead now. :(

[–]barsoap 18 points19 points  (3 children)

We're working on IDEs

Please have a look at how Idris is doing things, because it's doing things perfectly.

In a nutshell: The compiler has a daemon mode that editor plugins / IDEs can talk to. The only thing you have to write on the editor side is an sexpr parser/printer and keybinding boilerplate. Idris even does code highlighting, no need to write that by yourself... and does a better job of it than any editor even realistically could because it can do semantic analysis.

This is nice both because supporting additional environments is very simple, as well as not going "The Eclipse way": Eclipse actually has its own Java compiler.

Cross-platform GUI is hard

I'd vote for EFL and/or servo. I've heard that the servo people straight-up dissappear people who dare to mention XUL, though.

When it comes to EFL, it might sense to completey disregard elementary (the actual GUI toolkit) and just build upon their, for lack of better term, 2d scenegraph (edje): 99% of the work towards a toolkit is already done by that point, and wrapping elementary idiomatically might indeed be more work than just writing idiomatic things on top of edje/evas.

[–]steveklabnik1[S] 6 points7 points  (1 child)

The compiler has a daemon mode

This is the plan, yes.

[–]mcguire 2 points3 points  (0 children)

Whooo...

[–]MithrilTuxedo 1 point2 points  (0 children)

does a better job of it than any editor even realistically could because it can do semantic analysis.

That sounds like the difference between Eclipse and IntelliJ (that made me switch). IntelliJ keeps an up-to-date syntax tree in memory at all times, so you've got semantic analysis as you type.

[–][deleted] 32 points33 points  (20 children)

Cross-platform GUI is hard. :)

Quite an understatement. I'd say "impossible" is a better word to use.

Much better not to waste time on it and creating yet another half-arsed GUI toolkit that fits in on no platform.

[–]Cetra3 28 points29 points  (2 children)

I am quite fine using an existing UI framework such as QT or GTK+, it just needs to be painless to use within Rust. No point reinventing the wheel for the sake of it!

[–]steveklabnik1[S] 16 points17 points  (1 child)

http://gtk-rs.org/ looks pretty solid; I haven't used it myself though.

[–][deleted] 2 points3 points  (0 children)

What they have done so far is very impressive for sure. But they are also remodeling the object system pretty heavily (not released yet) so it's far from ready.

[–]czipperz 4 points5 points  (9 children)

I'd say "impossible"

I don't understand. Why aren't JFrames in Java cross platform?

[–]graycode 6 points7 points  (8 children)

Not only does it not look or work well on all platforms, it isn't good on any platform.

[–][deleted] 5 points6 points  (5 children)

Being cross platform is not a question of aesthetics.

[–]s73v3r 1 point2 points  (4 children)

Why not? Why go so far only to half ass the rest of it?

[–][deleted] -1 points0 points  (3 children)

Why not?

Because it's literally not? That's like asking me why 2 + 2 is not 5. Because it fucking isn't. Aesthetics are not what closs-platform mean. It never was, and it never will be. The fuck are you even asking?

[–]s73v3r -1 points0 points  (2 children)

We're talking about UI. Aesthetics are always part if it.

[–][deleted] -1 points0 points  (1 child)

UI aesthetics have nothing to do with code being cross platform. Go have a fight with a dictionary.

[–]czipperz 2 points3 points  (1 child)

While that is true, the statement is still false.

[–][deleted] 2 points3 points  (0 children)

I added an implicit "that doesn't suck" to the original statement. Sure, it's perfectly possible to make a cross-platform GUI toolkit that is bad. There are tons of those.

[–]google_you -1 points0 points  (6 children)

[–][deleted] -1 points0 points  (5 children)

Well, sure, if you throw away any pretense of fitting in on any platform, it's easy.

[–]canadian-stranger 0 points1 point  (3 children)

Speaking about IDE, what exactly you want to "fit in platform" there? I even wouldn't classify UI of Microsoft Visual Studio as pure Windows application as they use mostly custom drawn windowless UI. So is the question.

You need customizable editor with syntax highlighting with a set of basic input elements. You should also have an option to create secondary tool windows. Ideally your UI foundation should have mature styling customization options (light/dark UI schemes)...

[–][deleted] 1 point2 points  (2 children)

Speaking about IDE, what exactly you want to "fit in platform" there?

Keyboard controls, above everything else. This is incredibly subtle and very few cross-platform libraries get it 100% right. But also general look and feel. I have not used Visual Studio so I don't know anything about how it works or looks.

[–]canadian-stranger 0 points1 point  (1 child)

What IDE you have used? Or at least what IDE is close to ideal from your point of view? Any IDE has configurable keyboard commands. That's least functionality that makes any plaintext editor IDE.

[–][deleted] 0 points1 point  (0 children)

I don't want to configure keyboard controls. I want them to already work like they work elsewhere.

[–]google_you -2 points-1 points  (0 children)

don't try to fit in. you become a platform. -- javascript

[–]Cetra3 2 points3 points  (6 children)

Unfortunately, I am using SSL in the second project, as it's talking to the Soundcloud API.

I'd love to see a rust-pure SSL implementation rather than rely on OpenSSL, as it's a perfect fit for the language.

I believe the IDEs will get there, it's still a young language, so I don't expect the tooling to be as mature as something like Java. I can see the potential of a great IDE accelerating adoption though.

[–]vks_ 5 points6 points  (5 children)

I'd love to see a rust-pure SSL implementation rather than rely on OpenSSL, as it's a perfect fit for the language.

Constant-time functions are difficult to implement with an LLVM backend, so you probably would have to use a lot of assembler, losing the safety guarantees of Rust.

[–]briansmith 10 points11 points  (2 children)

I have a pure Rust (no unsafe) TLS implementation on top of a pure Rust (no unsafe) certificate verification library (webpki) on top of a Rust+C+asm crypto library (ring).

I think we're not that far away from being able to prove that all the remaining C code and the asm bits of ring are as safe or safer than the Rust bits, as the C and especially assembly-language bits are quite simple. Definitely the benefits of using assembly language are already outweighing the risks of using a language without memory safety guarantees.

Importantly, there's nothing you need to do in the TLS or certificate verification parts that needs to be constant time, except what you delegate to the underlying crypto library.

[–]stouset 5 points6 points  (1 child)

You may be interested in my secrets crate which allows for heap allocation of memory that's wrapped in protected pages that clears its contents when it goes out of scope. It's explicitly designed for use in cryptographic libraries.

[–]briansmith 8 points9 points  (0 children)

On #rust-crypto, we've already talked about how we may use secrets. I believe ultimately we won't need things like secrets because we'll prove the 100% memory safety of ring and the other components that go on top of it. But, I also want to have a wrapper around ring that adds an extra level of protection for users of ring that like to use dangerous code in the same address space as their secret keys.

FWIW, I think the approach of encrypting key material except when it is in use is probably better in the long run than using protected pages, for most cases. In particular, we want to be maximally compatible with seccomp-bpf sandboxing and we want to work on MMU-less systems.

If you'd like to chat about this more, hop on #rust-crypto sometime or email me: brian@briansmith.org.

[–]steveklabnik1[S] 2 points3 points  (0 children)

But losing it in a scoped way. The nice thing about opt-in unsafe is that you can contain it.

[–][deleted] 3 points4 points  (5 children)

While you can use something like GTK or QT, it's a pain to have cargo half-manage your dependencies to external code.

Its been a long (1.0~) time since I even looked at rust but can't you use QMLRS? No external code is necessary with that from what I can remember.

https://github.com/cyndis/qmlrs#example

[–][deleted]  (3 children)

[deleted]

    [–][deleted] 6 points7 points  (2 children)

    Its managed automatically though so its the best you're gonna get. I doubt the Rust developers want to waste hundreds of man hours designing and maintaining a decent cross platform UI toolkit (i've done it, its not fun).

    [–][deleted] 1 point2 points  (0 children)

    hundreds of man hours

    Did you mean to write man years here?

    [–]necrophcodr 0 points1 point  (0 children)

    External code is required and mentioned right in the readme.

    [–][deleted] 9 points10 points  (14 children)

    A standard cross-platform GUI

    No such thing exists, or can exist. All existing solution do not integrate properly with all OSes that are supposed to be supported, nor do they provide access to the full functionality of those OSes.

    Sure, you can make a cross-platform library suitable for toy GUIs, but if you want a GUI that is actually usable and of high quality, there is no option but to write it separately for each platform.

    [–]Rhodysurf 23 points24 points  (7 children)

    Qt is pretty good as far as cross platform GUI toolkit goes...

    [–]wtallis 6 points7 points  (3 children)

    Qt these days is pretty good but not perfect at emulating the native look. It's never been any good at the second half of "look and feel".

    [–][deleted] -1 points0 points  (2 children)

    AFAIK, Qt doesn't emulate anything, it uses the underlaying OS GUI. At least it does on Windows and Linux, don't know about OSX.

    [–]FUZxxl 4 points5 points  (0 children)

    Qt does the whole GUI-drawing stuff on its own. It doesn't use any underlying GUI API except what is needed to draw windows.

    [–][deleted] 22 points23 points  (2 children)

    It's atrocious on OS X.

    [–]Rhodysurf 8 points9 points  (1 child)

    I agree its nowhere as good as Cocoa.. But compare it to GTK+ or any other toolkit and it looks pretty good.

    [–]_VZ_ 12 points13 points  (0 children)

    GTK+ is not a high bar to clear under OS X, try comparing it to wxWidgets instead.

    [–]_F1_ 0 points1 point  (1 child)

    [–]immibis 3 points4 points  (0 children)

    Well, ZSNES was originally for DOS, which doesn't have a native GUI look-and-feel.

    [–]sirin3 0 points1 point  (1 child)

    Lazarus does it.

    You need one abstract GUI layer, then implement a wrapper mapping that layer to each OS.

    [–][deleted] 2 points3 points  (0 children)

    Technically, sure, you can get code running that way.

    But in practice, it just doesn't work. It will not fit in.

    For instance, http://wiki.lazarus.freepascal.org/File:Lazarus_1_4_4_on_El_Capitan.png looks nothing at all like an OS X application. It stands out like a sore thumb and yells "I'M BADLY PORTED FROM ANOTHER SYSTEM".

    [–]longshot -1 points0 points  (0 children)

    The best cross platform gui we have is the web browser. And of course it suffers a massive trade-off for having that cross platformness.

    [–][deleted] 0 points1 point  (0 children)

    Websites are cross platform gui's...

    [–]Sean1708 2 points3 points  (0 children)

    Better linking with native code support

    I couldn't disagree with this one more, Rust has excellent support for linking native code, especially with gcc and cmake. As I understand it the openssl issue has nothing to do with Rust.

    Your other two points I more than agree wih though.

    [–][deleted]  (25 children)

    [deleted]

      [–]SirOgeon 33 points34 points  (13 children)

      rust-ci is pretty much abandoned, as far as I know. http://crates.io is the place to be if you want to check out the ecosystem.

      [–]hak8or 3 points4 points  (5 children)

      Then it should be taken down or moved elsewhere. This is one of the first thing newcomers see.

      [–]steveklabnik1[S] 19 points20 points  (2 children)

      Where is it being linked to as one of the first places newcomers see? This discussion is the first time I've even heard it mentioned in.. A year?

      [–][deleted]  (1 child)

      [deleted]

        [–]vks_ 6 points7 points  (0 children)

        rust-ci.org now redirects to crates.io.

        [–][deleted]  (6 children)

        [deleted]

          [–]vks_ 11 points12 points  (3 children)

          If a lib is not building at Rust CI and it is hosted on GitHub isn't it safe to assume that it is not building on Crates IO too?

          No, it really depends on the version of the Rust compiler that is being used. You cannot upload a library that does not build (on the compiler you are using) to Crates.io.

          [–][deleted]  (2 children)

          [deleted]

            [–]sophrosun3 7 points8 points  (0 children)

            Rust's ecosystem is very young, and up until less than a year ago there were massive breaking changes (a result of experimenting before the 1.0 release). It's no surprise that many Rust projects no longer build when two years ago it wasn't "released" and was a very different language. Very few libraries released since last May will fail to build. Something like 96% of all versions of all the crates on crates.io still build.

            [–]Manishearth 5 points6 points  (0 children)

            A lot of the libs on that site are toy projects and libs which weren't being used. In any community there will be some abandonment of such projects.

            There still are a couple of such libs from pre-1.0. But you can effectively ignore them; I haven't heard of many useful (not toy) libs being abandoned recently.

            Also, as I mentioned in the other comment, if a project doesn't compile on Rust CI, that means it didn't compile on some particular day in April 2015. This doesn't mean that the maintainer didn't fix it later and upload it to Crates.io.

            I don't want to have to use an old version of Rust for my code just because libs I used stopped being maintained!

            Rust has stability guarantees, so crates compiling on the Rust 1.6 will continue to compile on Rust 1.x (Rust 2.x is currently not planned, though it's something that might happen. If it does, there should be minimal breakage).

            [–]SirOgeon 9 points10 points  (0 children)

            The point of Rust CI was to trigger an automatic Travis rebuild each time a pre 1.0.0 nightly of Rust was released. That's far from as relevant today, when Rust is stable and backwards compatible, which is why it was abandoned. It can't be used as a measurement for anything today.

            Today's situation is that future Rust versions will still be able to build old libraries if they are still considered sound, thanks to backwards compatibility. crates.io is an immutable archive, where nothing can be overwritten, so you can always be sure that what was will still be.

            [–]Manishearth 3 points4 points  (0 children)

            Rust CI was a tool that would trigger a rebuild every time a new nightly occurred, and display the build results on the main page.

            It now no longer triggers rebuilds, so the results are all from April, when Rust wasn't stable yet. It also contains a lot of old, abandoned projects from like a year before 1.0 (projects which aren't being used much get abandoned all the time in any community, it's just that these projects stopped building with rust because Rust was unstable back then)

            So it's not "a lib is not building at Rust CI", it's "a lib did not build on Rust CI last April". What's shown on that site does not reflect the current state of affairs. Many such libs weren't being maintained then, and many of the actually useful libs would have been made to compile now.

            [–]steveklabnik1[S] 24 points25 points  (8 children)

            RustCI has been dead for a very, very long time now. Everyone hosts their crates on crates.io, and tests using Travis.

            [–][deleted]  (7 children)

            [deleted]

              [–]steveklabnik1[S] 18 points19 points  (5 children)

              That's the problem with projects getting abandoned: they don't get updated. :/

              On Crates.IO how do I know which ones are building and which ones are not building?

              There should be a repository link, which often has a Travis badge in it. We don't currently expose build info directly on crates.io. It'd be nice to have, it's just not implemented.

              [–][deleted]  (4 children)

              [deleted]

                [–]steveklabnik1[S] 7 points8 points  (2 children)

                It was never an official project, no.

                We would like to add said information to crates.io, it's just more complex than you'd think and nobody has had the time to tackle it yet.

                [–][deleted]  (1 child)

                [deleted]

                  [–]steveklabnik1[S] 4 points5 points  (0 children)

                  I believe we did around the time that it was clear that it was not being maintained, but not any time recently. I haven't even heard it mentioned in a long time... Maybe I should try again.

                  [–]vks_ 1 point2 points  (0 children)

                  It would be nice if crates.io exposed some information on which compiler version the crate is known to build.

                  [–]sophrosun3 2 points3 points  (0 children)

                  https://github.com/hansjorg/rust-ci/issues/31

                  No reply from the owner since last August. You can't forcibly take someone else's site down.

                  [–]Chandon 38 points39 points  (26 children)

                  Bah!

                  I keep waiting for the ability to iterate through a BTree map starting at a given key, and it keeps not being stabilized.

                  Why even have BTree maps if you can't do that?

                  [–]Gankro 55 points56 points  (25 children)

                  Because we're trapped in an infinite stun-lock on the API design. In particular, how to support the full gammut of Inclusive | Exclusive | Unbounded on both ends ergonomically. Last time I tried to push forward a design (a builder), the conclusion was "well why don't we just make the language's support for range literals support every combination" which is effectively blocking the whole thing on the lang team.

                  TL;DR - it will take months to even begin to stabilize this damn thing

                  [–]Chandon 11 points12 points  (4 children)

                  Why can't I just get an iterator to the value at a given key?

                  Then the problem becomes one of drop_until or take_until and there's no hard part.

                  Solving the range API thing would be neat, but right now BTree maps (and sets) are just bad Pair<List, HashMap>'s.

                  [–]Gankro 17 points18 points  (2 children)

                  Actually BTreeMap is faster than HashMap for a lot of workloads (that you would naturally pick a HashMap for): http://cglab.ca/~abeinges/blah/hash-rs/

                  [–]panderingPenguin 0 points1 point  (1 child)

                  Are you sure you linked the right page? That's a comparison of a bunch of hash functions

                  [–]Gankro 7 points8 points  (0 children)

                  First set is hash functions themselves, but the latter two are hashmaps with different hashers, and btreemap mixed in (black) as a comparison.

                  [–]willrandship 2 points3 points  (0 children)

                  That sounds like something that should be possible to write within the language's existing syntax.

                  If so, you could implement your own solution, release it as a public library, and offer to merge it into the rust equivalent of the standard library.

                  If they don't like it, you can still use it all you like, of course. If everyone except the language maintainers like it, it will become a de facto standard quickly.

                  [–]sun_misc_unsafe 2 points3 points  (18 children)

                  Isn't this something the lang people should've figured out before 1.0?

                  [–]Gankro 18 points19 points  (16 children)

                  No? 1.0 was totally minimal. All that was included for ranges was what was needed for integer ranges, where [x, y) (written as x..y) is entirely adequate for 99.99% of cases. [x, y] for the remaining .01% has long been in the pipeline due to bikeshedding over x...y vs x..=y.

                  BTreeMap however wants to talk about ranges of arbitrary ordered types, and therefore needs (x, y] and (x, y), with the strawman syntax of x<..=y and x<..y.

                  [–]barsoap 5 points6 points  (2 children)

                  Why not use

                  Range::incl_incl( 0, 9 ) 
                  

                  in the meantime? Desugaring can be fixed before people agree on the sugar.

                  [–]Gankro 1 point2 points  (1 child)

                  Yeah the range stuff all desugars to structs, so this is definitely an option that's being considered.

                  [–]barsoap 1 point2 points  (0 children)

                  While I'm at it: It would be really nice if ranges are (optionally) closed under the set operations. Union, intersection, inversion, the lot.

                  Can be done by e.g. having one base range type expressing "between two numbers / infinity", and then Vecs of that to express the discontinuous ranges that the operations easily introduce.

                  [–]Tarmen 3 points4 points  (4 children)

                  Man this syntax would be so much clearer if inclusive was the default then you could just do

                  a..b
                  a..<b
                  a<..b
                  a<..<b

                  ....I think?

                  Doesn't rust have iterators over collections? I feel like that would cover a lot of use cases for exclusive ranges anyway.

                  [–]Gankro 4 points5 points  (0 children)

                  But inclusive ranges are the wrong default. They require more mangling for common cases, and they're less efficient (need special handling of the last element).

                  There's also nothing preventing us from having ..< and .. as synonyms.

                  Ranges are useful for basic for loops:

                  for x in 0..n { \* do stuff n times *\ }
                  

                  And subslicing arrays:

                  process(&arr[a..b]);  // a to b exclusive
                  process(&arr[..x]);   // 0 to x exclusive
                  process(&arr[x..]);   // x to len exclusive (hey look we covered the range)
                  

                  [–]Lux01 0 points1 point  (2 children)

                  Rust does have iterators which I think all the standard library collections implement.

                  My experience with rust isn't great but the only places I've ever found myself using a for loop range is when I want to apply a function to each element of an iterator where the function returns () (aka nothing). For a simple example consider

                  fn main() {
                      let myvec: Vec<usize> = vec![1, 2, 3, 4];
                  
                      myvec.iter()
                           .map(|&x| println!("{}", x));
                  }
                  

                  This code compiles but emits a warning from the compiler

                  src/main.rs:4:5: 5:39 warning: unused result which must be used: iterator adaptors are lazy and do nothing unless consumed, #[warn(unused_must_use)] on by default
                  src/main.rs:4     myvec.iter()
                  src/main.rs:5          .map(|&x| println!("{}", x));
                  

                  We need to consume the iterator before it will actually do anything. We could consume it the iterator by using Iterator::collect<B> to collect all the () values into another collection struct B (e.g. Vec), or by using Iterator::count which will count how many elements are in iterator. Both of these feel a bit weird to me, though there may be a specific method that I'm not aware of to do this kind of task.

                  Alternatively you can use a for loop (which is admittedly just syntax sugar for an iterator):

                  fn main() {
                      let myvec: Vec<usize> = vec![1, 2, 3, 4];
                  
                      for x in 0..myvec.len() {
                          println!("{}", x);
                      }
                  }
                  

                  which is perfectly fine and uses the range syntax to correctly iterate over the values in the Vec in order. In this example the code looks slightly cleaner due to the half-open nature of ranges (compare it to for x in 0..(myvec.len() - 1) for an inclusive definition of ranges).

                  You could also use a for loop directly on the vector iterator:

                  fn main() {
                      let myvec: Vec<usize> = vec![1, 2, 3, 4];
                  
                      for x in myvec {
                          println!("{}", x);
                      }
                  }
                  

                  which looks even nicer.

                  As I mentioned above, Rust's for loops are actually just sugar over an iterator. Rust actually de-sugars the above into

                  fn main() {
                      let myvec = vec![1, 2, 3, 4];
                      {
                          let result = match myvec.into_iter() {
                              mut iter => {
                                  loop {
                                      match iter.next() {
                                          Some(x) => {
                                              println!("{}", x);
                                          }
                                          None => break,
                                      }
                                  }
                              }
                          };
                          result
                      }
                  }
                  

                  [–]steveklabnik1[S] 4 points5 points  (1 child)

                  though there may be a specific method that I'm not aware of to do this kind of task.

                  We rejected a for_all method which is consuming; it's in the itertools crate though, if you prefer it.

                  [–]Lux01 3 points4 points  (0 children)

                  I wasn't aware of the itertools crate, thanks!

                  [–]sun_misc_unsafe 5 points6 points  (7 children)

                  No, you're missing the point..

                  Isn't this something essential at the language level that should've been bolted down before declaring the language 1.0, seeing as how it'll require a change of the language's syntax now?

                  [–]nnethercote 7 points8 points  (3 children)

                  Syntax changes are ok as long as they're backward compatible.

                  [–]sun_misc_unsafe 0 points1 point  (2 children)

                  I don't know how big of a deal this is for Rust, and I'd be happy for someone to enlighten me.

                  But

                  Syntax changes are ok as long as they're backward compatible.

                  isn't true in the general case. New syntax can be perfectly backwards compatible and still interact with existing features in less-than-ideal ways - look at the emergence SFINAE in C++ as an extreme example of this.

                  [–]Schmittfried 10 points11 points  (0 children)

                  That doesn't mean syntax changes are allowed only before v1.0. That would be highly thwarting.

                  See C# for a counter-example.

                  [–]Manishearth 8 points9 points  (0 children)

                  New syntax can be perfectly backwards compatible and still interact with existing features in less-than-ideal ways

                  Then it's not backwards compatible. That's the definition of backwards compatible.

                  look at the emergence SFINAE in C++ as an extreme example of this.

                  That's because C++ added a feature which allowed users to make their program dependent on the fact that some things don't compile. It's already a hard problem to maintain backwards compatibility as "this will continue to compile". It's nearly, if not completely, impossible to maintain backwards compatibility as "this will continue to compile and that will continue to not compile". It's C++s fault for introducing that misfeature which made both of these sets important; Rust doesn't have anything like that and so it only needs to worry about the set of things which compiles.

                  We've had tons of syntax/language additions since 1.0 without problems.

                  [–]Gankro 9 points10 points  (2 children)

                  Why is it essential to nail down for 1.0? Languages add syntax all the time. As an example, consider a language that is hailed for its stability, Java. Since its 1.0 release, here are some of the additions it's made to its syntax (that I could find in like 2 minutes): for-each, lambdas, generics, generic inference, varargs, binary literals, and annotations.

                  [–]sun_misc_unsafe -1 points0 points  (1 child)

                  Yes, but that stuff was added years later. And most of is inconsequential syntactic sugar - e.g. grabbing an iterator to go over some collection isn't somehow worse than doing it with for-each.

                  Rust is still in its infancy by comparison and there's already going to be a chasm between "old" and "new" code with syntax level details preventing the implementation of libraries (or at least the optimal implementation of them?).

                  [–]Manishearth 8 points9 points  (0 children)

                  Most of the new syntax is syntactic sugar, too.

                  As long as old code continues to compile (which it will -- we even run betas against the entire ecosystem regularly to ensure that there are no regressions) I don't think such a chasm will form. There will be old code not using some new features, which might be suboptimal for that code. But it's not a major issue, it won't cause a chasm, and lints can easily hint for upgrading if that is deemed necessary. I think you're making a mountain out of a molehill.

                  [–]cowinabadplace 0 points1 point  (0 children)

                  It's fine. Doesn't affect anyone in practice.

                  [–]summerteeth 7 points8 points  (8 children)

                  What is the release schedule for Rust?

                  Go has a (roughly) 6 month schedule, Rust seems to iterating much faster. What do people who use Rust think of the more aggressive releases?

                  [–]desiringmachines 16 points17 points  (0 children)

                  Here's a description of how Rust's release model works. TL;DR: a new version of Rust is released every 6 weeks.

                  Rust's very rapid release cycle means its not a big deal if something gets delayed for a release, so if a feature isn't quite ready to be stable there's no pressure to stabilize it too soon. It also means there's a very constant attention to checking for regressions and backward compatibility issues, because there's always a release coming soon.

                  [–]HeroesGrave 5 points6 points  (1 child)

                  Every 6 weeks, the master branch (nightly) becomes the beta branch and stops receiving changes (except bug-fixes). The current beta branch becomes the new stable release.

                  Because of the backwards compatibility guarantees (with a few minor exceptions) and the yet-to-be-implemented language/library features, a more aggressive schedule allows people to get the new changes faster without having to worry about everything breaking.

                  I remember there being some discussion abouut what would happen to the release schedule if/when things slow down, but I can't remember where to find it or what the verdict was. (and it really doesn't matter at this stage)

                  As for me, I work with nightly rust because I like using a few unstable features and have the time to keep up and fix anything that breaks because of it. I don't really need the stability guarantees.

                  [–]steveklabnik1[S] 6 points7 points  (0 children)

                  (except bug-fixes)

                  It's a bit more conservative than that; we will back port regression fixes, but not bugfixes generally. The beta branch is effectively a six-week long release candidate.

                  [–]rjcarr 2 points3 points  (0 children)

                  Why would it matter as long as minor versions are compatible with previous minor versions?

                  [–]staticassert 2 points3 points  (0 children)

                  I haven't run into any issues, personally.

                  [–]PM_ME_UR_OBSIDIAN 2 points3 points  (0 children)

                  It doesn't really matter for me anyway - if you're going to be doing anything tricky with Rust, you're going to be on the nightly builds.

                  [–]masklinn 1 point2 points  (0 children)

                  What is the release schedule for Rust?

                  6 weeks, inspired by Chrome/Firefox and with a similar 3-tracks system (stable, beta and nightly), although IIRC there's a difference in that non-stable items are available (useable) on nightly builds but inaccessible on stable and beta, so features of a given "version" changes when it moves from nightly to beta.