I've some JavaScript this evening and the whole mutability thing just bit me really badly.
Rust has me making assumptions that are NOT true in this world
Rust has me making assumptions that are NOT true in this world
Comments
$a = array('a', 'b', 'c', 'd');
foreach ($a as &$v) { }
foreach ($a as $v) { }
print_r($a);
?>
which of course outputs
Array
(
[0] => a
[1] => b
[2] => c
[3] => c
)
https://stackoverflow.com/questions/4969243/strange-behavior-of-foreach-when-using-reference-foreach-a-as-v
At first I even missed several of them because I had gotten used to not having to look for such issues — rustc had me spoiled that way!
I want my infra, cryptography, OS etc. to be Rust, strongly typed, etc.
But notebook-level experiments in Python are nice. I can worry about types (static or gradual) when I have the thing working.
Yeah one of those nights