4 ms·
I write and test a lot of both rust and python, so I can say quite confidently: 1. Of course a type system is not as "flexible" as arbitrary test code. 2. Com
by 12_throw_away 2y ago
I write and test a lot of both rust and python, so I can say quite confidently:
1. Of course a type system is not as "flexible" as arbitrary test code.
2. Compiler-enforced type safety is many orders of magnitude easier to maintain than the equivalent unit tests
3. Defining rigorously enforced invariants with a type system is far, far more powerful than hoping you remembered to test all the important cases.
- d0mine 2y agoYour 2-3 points remind me of the quote by Ludwig Wittgenstein: “The limits of my language means the limits of my world.” Of course if you limit yourself only to problems that can be effectively solved by type system, then it may work. It is like limiting yourself only to those text processing tasks where regexs work. Yes, some text processing tasks may be much more effectively solved using a regex. But it is obvious that at some point in a more general case grep can’t replace python. It may be less apparent for compiler vs. python case but the general logic is the same.
- 12_throw_away 1y agoSo you asked a question, didn't like the answer, and decided to just start insulting people instead?
- d0mine 1y agoNo disrespect intended. I’m making purely technical point.
- pdimitar 1y agoNobody is "limiting" themselves to anything. That's not a counterargument you're making. We all deploy to production, dude. Strong static typing (Rust), even only dynamic strong typing + pattern matching (Elixir), are leagues better than Python. Literal 3x - 7x less code and less production errors both in Elixir and Rust, over the course of 5 years. You're the one limiting yourself. Expand your horizons.