Earlier quoted context omitted.
I was measuring by number of projects. Consider that most web browsers also depend on a dozen or more C libraries.
> I was measuring by number of projects. I think even going by that metric C++ does pretty good. Not exactly "number of projects", but here are some numbers: GitHub statistic: https://octoverse.github.com/projects.html C++: 5th place C: 9th place StackOverflow survey: https://insights.stackoverflow.com/survey/2018/ C++: 10th place C: 11th place > Consider that most web browsers also depend on a dozen or more C librar…
Rust is not a good C replacement
121–130 of 213 posts
Re: Rust is not a good C replacement
#122Sincere question, I didn't realize that Rust didn't have a specification. How can folk say Rust guarantees safety when it doesn't guarantee an implementation? I don't see how you could have one without the other. Now, admittedly, the lowest level language I've used is Go!, so fairly abstracted (and no memory management), so I might be mistaken, but it doesn't seem like you can have safety without a specification.
Just because there isn't a formal spec, doesn't mean that the underlying systems aren't built with some rules, grounded in computer science and math. We believe that the systems we've set up do guarantee those properties, even if they haven't yet been formally verified. And a subset of them have been formally verified, which also increases confidence.
Adding to that confidence level is empirical results: while people have found implementation bugs, which will always exist in any implementation, nobody has managed to demonstrate that the model is fundamentally broken. That it's been years, and many people have tried, also leads us to suspect that our conclusions are correct here.
Put another way: not all specs are equal. Some are formal, some are informal. Just having a spec doesn't actually guarantee anything either. Most languages don't have a specification at all.
Re: Rust is not a good C replacement
#123> Safety. Yes, Rust is more safe. I don’t really care. In light of all of these problems, I’ll take my segfaults and buffer overflows. I especially refuse to “rewrite it in Rust” - because no matter what, rewriting an entire program from scratch is always going to introduce more bugs than maintaining the C program ever would. And that is why we can't have nice things. "I don't really care" if someone overflows my buf…
Re: Rust is not a good C replacement
#124Earlier quoted context omitted.
> I was measuring by number of projects. I think even going by that metric C++ does pretty good. Not exactly "number of projects", but here are some numbers: GitHub statistic: https://octoverse.github.com/projects.html C++: 5th place C: 9th place StackOverflow survey: https://insights.stackoverflow.com/survey/2018/ C++: 10th place C: 11th place > Consider that most web browsers also depend on a dozen or more C librar…
I don't think that metric is fair, either. A large number of C users don't use Github nor SO.
Has it supplanted C? Definitely not. But in some areas it did (e.g. game development).
Re: Rust is not a good C replacement
#125Totally agree with his observations but I disagree with the conclusion. C is a ok programming language. The first language that realises that simplicity above all is the most important feature of any language and uses the same safety measures like Rust is going to win over a huge user base.
Low level programming in a safe way is a complicated endaevor. The assembly language with a few instructions can be the ultimately simple language, but it doesn't offer the same features that Rust does. While I am all for simplicity, I just don't think it's all that obvious that a language could possibly be simple, fast, and safe at the same time.
Re: Rust is not a good C replacement
#126Earlier quoted context omitted.
A few niches? Every major GUI application and video game is niche?
i disagree with the main article, but he is right. C++ was supposed to be more than just browsers, GUI and video games: it shuold have been a better C. It failed. It was supposed to be more secure than C. It failed. Mostly the OOP failed part, because it wasn't that good of an idea (usefull in some case, to do geometry and grapic stuff, and for other, specific cases). And Java's "everything is an object" did not help…
If it's worse and less secure than C, why is it so popular? Why didn't all people continue to use C?
Re: Rust is not a good C replacement
#127Re: Rust is not a good C replacement
#128I think there is a gap in the market for small language which is just a "better C", but developing a new language is a great deal of work, and it would be hard to compete against the alternative of using a small subset of {Ada, Rust, whatever}. Maybe the large languages should look at defining official subsets, to make life simpler both for programmers and validation. Ada used to have something of the sort (and still…
Re: Rust is not a good C replacement
#129Earlier quoted context omitted.
Okay, but this seems like letting the perfect get in the way of the good? A maintained, readable, informal spec should be quite useful as a starting point for writing a more formal spec later. It need not be definitive. It would be quite reasonable to point out areas that aren't nailed down yet - this is also useful for the reader.
What do you want out of an informal spec that isn't provided by "The Rust Reference"[1]? [1] https://doc.rust-lang.org/reference/index.html
(Maybe it already is like that, but the disclaimers say it's not.)
Re: Rust is not a good C replacement
#130Totally agree with his observations but I disagree with the conclusion. C is a ok programming language. The first language that realises that simplicity above all is the most important feature of any language and uses the same safety measures like Rust is going to win over a huge user base.
Simplicity is not the end all be all. Where is Rust, as a language, needlessly complex?