3 ms·
If your main concern is reducing bugs and security issues, then you really should look into modern typed languages like Rust.
by noelwelsh 13y ago
If your main concern is reducing bugs and security issues, then you really should look into modern typed languages like Rust.
- zzzcpan 13y agoI did, doesn't seem to be particularly focused on neither bugs nor security.
- noelwelsh 13y agoWow, we have a very different reading of Rust. Safe concurrency and memory management doesn't lead to reduced bugs? Eliminating unsafe memory access doesn't lead to increased security?
- zzzcpan 13y agoYou are assuming that most of the languages people use don't have safe automatic memory management, right? This is of course incorrect. Now, lets compare Rust and Go, what makes Rust programs have fewer bugs, than Go programs? Is there any supporting research that shows how Rust eliminates any particular class of high level bugs? No, there isn't. So, no, Rust doesn't focus on eliminating bugs.
- noelwelsh 13y agoI'll make one effort in good faith to answer your questions, though I expect you're not interested in hearing the answer. There is a class of programs where manual control over memory layout is important. For example, if you're writing an OS, as Mozilla is, you need this control to talk to hardware. It is also important in some domains where performance is important (e.g. games and big data.) Rust is the only language (outside of research) that offers control over memory layout while also providing memory safety. That is, no access to uninitialized memory, etc. This clearly eliminates a huge class of bugs relative to C/C++, the only language with substantial usage in this space. Race conditions (data races) are considered important enough by the Go developers that they have a tool to detect them: http://blog.golang.org/race-detector http://blog.golang.org/race-detector In Rust these error cannot happen as programs containing data races cannot compile. Then there is the usual modern type system stuff of eliminating nulls and so on.
- zzzcpan 13y agoI don't like arguments like that, as they don't have any supporting data. I happen to analyze significant amount of bugs in a large C codebase and things you are talking about don't seem to be as important, as you claim. But well, this is what's wrong with programming languages, nobody cares enough to do some research. That's ok though, we just think about languages differently.
- noelwelsh 13y agoI find it very strange to see an argument that memory safety is not an important property. Here are some arguments for it's importance: "Memory error exploitations have been around for over 25 years and still rank among the top 3 most dangerous software errors." http://www.isg.rhul.ac.uk/sullivan/pubs/raid-2012.pdf http://www.isg.rhul.ac.uk/sullivan/pubs/raid-2012.pdf Or see work on static analysis of kernels and device drivers like http://research.microsoft.com/pubs/74567/eurosys2006.pdf http://research.microsoft.com/pubs/74567/eurosys2006.pdf I'm very interested to hear what you consider more important sources of errors.
- zzzcpan 13y agoI didn't say that memory safety is not important. I was talking about the need to control memory layout and other bells and whistles. Anyway, you suggested Rust under false assumptions. Rust doesn't care about reliability and security any more, than most of the modern languages. Even Perl with its taint mode is more secure, than Rust.
- noelwelsh 13y agoI'm out; this discussion is not productive to me. You have given no evidence to back your claims -- you have no data, to use your phrase, though you are so keen to see mine. Specifically: I gave examples of the need to control memory layout and memory allocation. I gave examples of Rust's features leading to reliability and security -- memory safety and absence of data races.
- deleted 13y ago