3 ms·
I'd prefer something that is based on C and C++ than a new language that offers new paradigms but fails to really gain entry because it tries too much to solve
by jokoon 10y ago
I'd prefer something that is based on C and C++ than a new language that offers new paradigms but fails to really gain entry because it tries too much to solve some common, difficult, programming problems.
I don't really buy the whole safety issue. Granted, fighting against unsafe programming is hard, but I will always prefer a language that is easy to learn and lets you do mistakes so you can just fix them.
- coldtea 10y agoOnly we've had what you ask for since the last 40+ years. And it hadn't work out that well, costing billions and untold lost hours and security issues.
- duneroadrunner 10y agoYes. But there's also substantial cost in abandoning existing C/C++ codebases and rewriting them from scratch. Since the advances of C++11, something like SaferCPlusPlus[1] (a memory safe dialect/subset of C++) might be a more practical/expedient way to address memory safety in many cases. An automated conversion (assistance) tool is being worked on, but could use more bodies if anyone's looking for a project to contribute to. :) [1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus-BenchmarksGame https://github.com/duneroadrunner/SaferCPlusPlus-BenchmarksG...
- coldtea 10y ago>Yes. But there's also substantial cost in abandoning existing C/C++ codebases and rewriting them from scratch. Fortunately, we don't have too. We can always a) just write NEW stuff in Rust, or b) just use Rust to extend and piecemeal replace old apps (since it supports linking to C and/or C++ libs).
- duneroadrunner 10y ago> or b) just use Rust to extend and piecemeal replace old apps (since it supports linking to C and/or C++ libs). Yes, Rust's FFI support is nice, but rewriting piecemeal is still rewriting. (And retesting.) It should be faster and easier to just replace unsafe elements in existing code. Of course, that doesn't conflict with choosing Rust for new components and rewrites of existing components when the time and resources are available. Btw, I haven't investigated lately, what is the state of Rust interoperability with C++ interfaces?
- kbenson 10y ago> Btw, I haven't investigated lately, what is the state of Rust interoperability with C++ interfaces? Not that I'm an expert on the matter, I think it's still through C interop both directions. There was a github project for a Rust module submitted to HN recently[1] to correctly deal with C++ name mangling, and I think it was mentioned that the plan is for it to eventually be used as part of the future C++ interop plans, but I could be misremembering. 1: https://news.ycombinator.com/item?id=13706799 https://news.ycombinator.com/item?id=13706799
- tmccrmck 10y agoThere's also checkedc from Microsoft. https://github.com/Microsoft/checkedc https://github.com/Microsoft/checkedc
- jokoon 10y agoSecurity will always be an issue with computers. You cannot have both security and performance so easily. That's why there are languages like python, C# and java to reduce development costs at the price of performance. Rust might be safer, but it really lacks entry. If we could just have something a little simpler than C++ and with nicer features than C, it would be great. If microsoft adopts D, I would be so happy.