3 ms·
"You just limited the set of programs you can write to those that can be written ..." Yes! That's awesome! I want the set of programs I can write to be small,
by TheDong 7y ago
"You just limited the set of programs you can write to those that can be written ..."
Yes! That's awesome! I want the set of programs I can write to be small, but still large enough to contain correct programs.
For example, I really like statically typed languages! But what is static typing? It's rules that reduce the set of valid programs. In a dynamically typed language, 'def double(x): x*2; double(os.Open("foo"))' or other such nonsense is a valid program that errors out at runtime reliably. In a statically typed language, that program is not valid. Woo! That's a whole class of programs that do bad stuff which aren't valid anymore!
If rust restricts the set of valid programs to those that structure the ownership of data more rigidly, I'll take it!
I do realize that rust has escape hatches that let you model those things when you need to, but I'll gladly take a language that pushes programmers away from difficult to reason about data-ownership-models even if it doesn't prevent all such cases.