1. 11
  1. 5

    Having Send and Sync in the type system is amazing for making and using libraries. Thanks to these two traits thread-safety of everything is documented in a machine-readable way and checked by the compiler. This used be a list of caveats written in prose in documentation, if you were lucky to have one, and you were on your own ensuring that the program respects it.

    It’s really clever that Rust as a language has no concept of what a thread is, or what mutexes or atomics do, but thanks to Send/Sync all these constructs can be expressed and checked for safety.

    1. 4

      “On the other hand, it is a real challenge to generate code that is maintainable and scal- able over time in these types of languages. In 2010, Rust emerged as a new programming language designed for concurrent and secure applica- tions, which adopts features of procedural, object-oriented and functional languages.”

      My C code from 2010 runs just fine today. The same cannot be said about 10 year old rust code.

      1. 6

        How’s your BCPL code running? In 2010 the Rust project was in very early stage and looked more like Ocaml-flavored Erlang.

        Rust as we know it has been released in 2015. Since then it has been remarkably stable and backwards compatible. In the 54 releases so far I had to change less code than it takes to make C work with more than one compiler.

        1. 2

          The point being that the article specifically mentioned Rust as a language that emerged in 2010 as being scalable and maintainable, as in lower-effort than C, when in fact it was only considered stable in 2015 with a revision that says (quoting) “Since it’s the default edition, there’s no way to port your code to Rust 2015; it just is.”[0]

          In regards to the two points that you specifically raise:

          1. BCPL is not mentioned in the paper, I fail to see the point you are taking here.
          2. The effort taken to make C work with more than one compiler is not something that can be compared to Rust (there is only one compiler, and likely will ever be).

          To the same extent, I could take such an arrogant stance and ask you:

          “How’s your effort in making your Rust code work with more than one compiler?”

          But I won’t.

          [0] https://doc.rust-lang.org/edition-guide/rust-2015/index.html

          1. 1

            You’re really hanging on to the semantics of “emerged”/“came to light”. The paper isn’t even about this, and doesn’t make claims about historical versions of Rust. They’re just giving some background in the abstract.

            And 5 years untill stable isn’t even unusual. C has “emerged” in 1972, K&R in 1978, ANSI C 1989.