> So, what does the current ferment about Rust tell us?
That the industry is ready to accept that programmers take
a more disciplined approach by embracing strong data typing
enhanced with program annotations.
I have a question. Who asked for this? Like who exactly raised their hand and said yes, I want a systems programming language that won't let me compile syntactically and semantically correct programs because they don't follow an arbitrary ownership model?
I suspect that you’re not asking in earnest because otherwise you’d look up the Rust Foundation’s membership page[1] and see for yourself which companies asked for this emphatically enough to put money behind it.
We use languages that impose other “arbitrary” constraints on us in order to save ourselves from our mistakes. For example, we avoid implicit conversions from strings to integers, or we use type systems that make sure that we don’t treat “dollar” type decimals as if they were “euro” types. The ownership model is a similar concept but to avoid memory bugs.
Right, I understand that big corporations are pushing a new systems programming language that they say saves programmers from their own mistakes. My question was whether any programmers actually asked for it, and if so, which ones?
> We use languages that impose other “arbitrary” constraints on us
> The ownership model is a similar concept [to type checking]
Except we didn't. K&R rejected Pascal for their work on Unix precisely because it was too strongly typed and didn't provide sufficient escape hatches. Arrays were typed by length, there was no pointer arithmetic, there was little or no typecasting or coercion, no generic pointer types, no null pointers, etc.
All these restrictions that were in place to create a safer language made Pascal completely unsuited to writing allocators, buffered IO, and other OS internals. So instead, they ditched Pascal and created C and had Unix up in running in just a couple of years. Maybe there's a lesson there.
> My question was whether any programmers actually asked for it, and if so, which ones?
I have to admit, this question sounds very strange to me.
Corporations don't get work done. People do. Rust has been designed and implemented by programmers.[1] There's countless hours of talks and interviews and many articles and books written on Rust by programmers. They did all that work without being forced by anyone.
> All these restrictions that were in place to create a safer language made Pascal completely unsuited to writing allocators, buffered IO, and other OS internals. ... Maybe there's a lesson there.
Rust lets you do explicit type casting and write `unsafe` blocks in situations where you absolutely need to dereference raw pointers or do pointer arithmetic.[2] It lets you create null pointers or mark pointers as non-null. But not all code needs to do that. In Rust, you can isolate the code that does from the rest that doesn't.
This is like saying "who raised their hand and asked for a language where any number of trivial mistakes allowed by the compiler will lead to massive security holes?"
No one, and yet we have C and people use it. No one "asks" for the disadvantages of a given language, they are just trade-offs in exchange for some advantages.
The reason people use systems programming languages is because they need to efficiently and effectively manage and manipulate memory. That's why C was created in the first place - to write the 100,000+ lines of code that would become Unix Version 4 in 1973. (Not bad for a two year old language.)
Which means that when you present me with a systems programming language that enforces an ownership concept that makes it much more difficult to write allocators or even doubly linked data structures, and then use that language's existence to justify adding the same restrictions into a version of C, "who asked for this?" might well be the least offensive response I can muster.
C makes it difficult to write allocators and doubly linked lists too. It doesn’t yell at you when you make them, but they are difficult to write nonetheless, because we see that it’s easy to write incorrect code if you’re not very, very careful.
I have a question. Who asked for this? Like who exactly raised their hand and said yes, I want a systems programming language that won't let me compile syntactically and semantically correct programs because they don't follow an arbitrary ownership model?