2,860 karma · joined Feb 27, 2013 (13y ago) · 3,465 submissions
comment 3y ago · link · parent
comment 3y ago · link · parent
Can you give an example of how you would state an Axiom in Haskell? Here is an example of how it is done in LEAN:
axiom propext {a b : Prop} : (a <-> b) → a = b
It declares Propositional Extensionality to be true with no evidence/proof.
comment 3y ago · link · parent
The worst companies I have ever worked for didn’t have the skills to do it.
So yet again it depends on the quality of your developers. Not how you do things.
comment 3y ago · link · parent
1. You read the source to build a model (theory) of the application in your head.
2. You use the model (theory) to work out a solution.
3. You then translate the abstract solution into actual code.
My experience:
Mastering step 2 makes all the difference when it comes to writing high quality software fast. The best developers I have ever worked with master step 2 and typically spend more time doing step 2 than inexperienced/bad developers. The result is typically much simpler solutions that can be built fast and require less maintenance. Basically the more time you spend on step 2, the faster you write high quality code.
comment 3y ago · link · parent
At work we put the smartest most experienced people on maintenance work. Because it is the lifeblood and cash flow of the company. It directly pays the salaries of people working on new software that might never make a profit!
comment 3y ago · link · parent
However it doesn’t solve any problems I have at work. I routinely deploy very large C++ applications to large international companies around the world.
And I haven’t had a memory or multi-threading problem causing any production issues for as long as I remember. I routinely use Valgrind and Helgrind to make sure it stays that way.
However I do have 9000+ auto tests that push the code way beyond any possible real life customer use cases. Enabling me to make major changes and optimizations to the code and drop it into production with confidence. I haven’t had a production bug for 5+ years.
Switching to Rust won’t change that. I would still need those 9000+ tests to make sure my Rust deployment would be error free.
So my point is this: No programming language will magically make your code bug free or eradicate the need for you to use sound software engineering practices like comprehensive auto tests.
There are of course languages more powerful than Rust that will allow you to write proven correct bug free code (Agda/Idris/Coq/..) However those languages won’t prove that your code has the performance and latency needed in a real world environment for example.
So I would rather spend more time polishing and improving my auto test skills rather than investing in switching languages. My ROI will be way higher.
If reading this makes you angry and eager to defend the honour of Rust and discredit what I am saying, please understand that I have nothing against Rust. This is more a summary of my current thinking on Rust and any other new programming language wanting to take over from C++.
I would love to hear the thoughts of other experienced C++ developers who are responsible for very large C++ applications used by real customers.
comment 3y ago · link · parent
Given two different implementations of software, that gives users the exact same features, you will often find that one implementation is simpler than the other. Using less libraries, a simpler build system, less code etc. That’s the kind of simplicity we should strive for. Not software with less features.
comment 3y ago · link · parent
The secret is 9000+ auto tests pushing the code way beyond real world usage.
Changing from C++ to another language won't change the fact that those tests are needed. Memory leaks and multi-threading issues are simply non-issues for me. I use tools like Helgrind and Valgrind to find and fix those.
In other words, new languages like Rust doesn't solve any problems I have.
There is no silver bullet.
comment 3y ago · link · parent
Nobody suggests you shouldn’t. Stroustrup has spent most of his career working on improving C++.
You are reading way more into his comment than I think was intended or implied.
C++ is one of the most successful programming languages in history. There is a reason why.
comment 3y ago · link · parent
comment 3y ago · link · parent