3 ms·
In Python, everything is a reference, so you don't need special syntax to mark them. There just happen to be some types where you cannot change the referenced
by Skeime 3y ago
In Python, everything is a reference, so you don't need special syntax to mark them.
There just happen to be some types where you cannot change the referenced value in any way. These behave like value types in other languages.
(If you believe that they should be marked explicitly, do you also believe the same thing about Rust? I.e. should the Rust compiler throw an error if you never actually change a reference type, as you "should" be using a value type in that case?)